similar to: replicate matrix

Displaying 20 results from an estimated 10000 matches similar to: "replicate matrix"

2010 Feb 22
2
change email subscription
Dear R team, As this is a university email address with very small inbox limit, can I please change my R email subscription to another email address instead of this one? My new email address is wendy2.qiao@gmail.com. I have change my email in my profile, but seems that does not change my subscription. Thank you. Wendy [[alternative HTML version deleted]]
2010 Feb 20
1
coerce (list) object to type 'double'
Dear all, I am really new to R, and I have problem here. I searched around, but did not get a solution. I have a numetrix matrix (20 by 25) saved in .csv. I read it as >sx<-read.csv("sx.csv",header=F) Then I try to convert it to numeric using >sx<-as.numeric(sx) Error: (list) object cannot be coerced to type 'double' The class of sx is "data.frame". I
2011 Apr 10
3
count number of TRUEs in each row
Hi all, I have a huge matrix of TRUE/FALSE table like following, and I want to count the number of TRUEs in each row. Instead of looping through each row and do length(Z[Z==TRUE]), I am wondering if there is an easier way of doing this. [,1] [,2] [,3] [1,]TRUE FALSE FALSE [2,]FALSE TRUE TRUE Thank you in advance. Wendy -- View this message in context:
2011 Nov 01
4
round up a number to 10^4
Hi all, I have a list of numbers, e.g., X = c(60593.23, 71631.17, 75320.1), and want to round them so the output is Y = c(60000, 80000, 80000). I tried Y<-round(X,-4), but it gives me Y = c(60000, 70000, 80000). Do anybody know how to round up a number to 10^4? Thank you in advance. Wendy -- View this message in context:
2011 Nov 01
2
annotate histogram
Hi all, I want to make a histogram like the one show http://nar.oxfordjournals.org/content/39/suppl_1/D1011/F1.expansion.html here , but I did not figure out how to add the red marks at the bottom of the bars. Could anybody help? Thank you very much -- View this message in context: http://r.789695.n4.nabble.com/annotate-histogram-tp3963960p3963960.html Sent from the R help mailing list archive
2007 Feb 12
1
Trying to replicate error message in subset()
Hi, there I am trying to replicate an error message in subset() to see what it is that I'm doing wrong with the datasets I am trying to work with. Essentially, I am trying to pass a string vector to subset() in order to select a specific collection of cases (i.e., I have data for these cases in one table, and want to select data from another table that match up with the cases in the
2018 May 02
8
Converting a list to a data frame
I suspect this is pretty easy, but I'm having trouble figuring it out. Basically, I have a list of data frames such as the following example: list(A=data.frame(x=1:2, y=3:4),B=data.frame(x=5:6,y=7:8)) I would like to turn this into data frame where the list elements are essentially rbind'ed together and the element name becomes a new variable. For example, I would like to turn the
2018 May 04
2
Converting a list to a data frame
Good morning. Novice usR. Here. I am following this string, among many, learning as I go. Quick question please? I thought that perhaps ata.frame was part of the zoo pkg, b/c when I searched it came up in help? However, evidently not or I am not using it properly. Please advise, thank you. x <- list(A=data.frame(x=1:2, y=3:4),B=data.frame(x=5:6,y=7:8)) x2 <- do.call(rbind,
2018 May 02
0
Converting a list to a data frame
Hi Kevin, There is probably a better way, but it can be done in two steps like this temp <- list(A=data.frame(x=1:2, y=3:4),B=data.frame(x=5:6,y=7:8)) temp <- lapply(names(temp), function(n, temp) { temp[[n]]$type <- n return(temp[[n]]) }, temp = temp) do.call(rbind, temp) On Wed, May 2, 2018 at 1:11 PM, Kevin E. Thorpe <kevin.thorpe at utoronto.ca> wrote: > I suspect
2018 May 02
3
Converting a list to a data frame
Or add the type column first and then rbind: x <- list(A=data.frame(x=1:2, y=3:4),B=data.frame(x=5:6,y=7:8)) x2 <- do.call(rbind, lapply(names(x), function(z) data.frame(type=z, dat[[z]]))) ---------------------------------------- David L Carlson Department of Anthropology Texas A&M University College Station, TX 77843-4352 -----Original Message----- From: R-help
2018 May 04
0
Converting a list to a data frame
It looks like you made a copy/paste error below. Your ata.frame should be data.frame. Kevin On 05/04/2018 08:18 AM, Bill Poling wrote: > Good morning. > > Novice usR. Here. > > I am following this string, among many, learning as I go. > > Quick question please? > > I thought that perhaps ata.frame was part of the zoo pkg, b/c when I > searched it came up in
2018 May 02
0
Converting a list to a data frame
Typo: dat[[z]] should be x[[z]]: x2 <- do.call(rbind, lapply(names(x), function(z) data.frame(type=z, x[[z]]))) x2 type x y 1 A 1 3 2 A 2 4 3 B 5 7 4 B 6 8 David C -----Original Message----- From: R-help <r-help-bounces at r-project.org> On Behalf Of David L Carlson Sent: Wednesday, May 2, 2018 3:51 PM To: William Dunlap <wdunlap at tibco.com>; Kevin E.
2006 Sep 18
7
smb.conf
Hi all My client want a shared folder so that only two people can access and write to it. I added the following to my smb.conf [private] writeble = yes guest ok = no path = /home/samba/private valid users = wendy, pierre write list = wendy, pierre force user = nobody All i need yo do now is make the folder "private" to nobody. How would i go on by doing that and would this work.
2011 Aug 20
2
reshape a matrix
Hi all, I have a data.frame like following A<-c('d0','d0','d1','d1','d2','d2') B<-rep(c('control','sample'),3) C<-c(rep(100000,2),200,300,400,500) dataframe<-data.frame(A,B,C) I want to reshape the matrix, so the matrix with 'd0', 'd1' and 'd2' in rows and 'control' and 'sample'
2018 May 02
0
Converting a list to a data frame
> x1 <- do.call(rbind, c(x, list(make.row.names=FALSE))) > x2 <- cbind(type=rep(names(x), vapply(x, nrow, 0)), x1) > str(x2) 'data.frame': 4 obs. of 3 variables: $ type: Factor w/ 2 levels "A","B": 1 1 2 2 $ x : int 1 2 5 6 $ y : int 3 4 7 8 Bill Dunlap TIBCO Software wdunlap tibco.com On Wed, May 2, 2018 at 10:11 AM, Kevin E. Thorpe
2018 May 03
1
Converting a list to a data frame
>>>>> David L Carlson <dcarlson at tamu.edu> >>>>> on Wed, 2 May 2018 21:43:52 +0000 writes: > Typo: dat[[z]] should be x[[z]]: > > x2 <- do.call(rbind, lapply(names(x), function(z) > data.frame(type=z, x[[z]]))) > x2 > type x y > 1 A 1 3 > 2 A 2 4 > 3 B 5 7 > 4 B 6 8 > >
2013 Jul 24
2
[LLVMdev] Program compiled with Clang -pg and -O crashes with SEGFAULT
Hi, I am trying to compile a simple program with Clang 3.3 on Linux and used -pg and -O2 option. The program would crash with segfault. Interestingly if I compile it with -pg option only it works. Do you have any idea why it crashes? And any workaround? $ cat myprog.c int main() { return 0; } $ clang -v -pg -O2 myprog.c clang version 3.3 (tags/RELEASE_33/final) Target:
2013 Jul 24
0
[LLVMdev] Program compiled with Clang -pg and -O crashes with SEGFAULT
Hi Qiao, On 24/07/13 08:23, Qiao Yang wrote: > Hi, > > I am trying to compile a simple program with Clang 3.3 on Linux and used -pg and -O2 option. The program would crash with segfault. Interestingly if I compile it with -pg option only it works. Do you have any idea why it crashes? And any workaround? > > $ cat myprog.c > int main() { > return 0; > } > > $
2011 Mar 24
2
[LLVMdev] Is LLVM appropriate for implementing a shell interpreter?
Hi devs, We are implementing a library that interprets shell scripts so that other programs could efficiently talk to bash. We'd like to hear your advice on whether LLVM is appropriate for us. Here are our considerations: In most cases our library will interpret each script just once. Our current approach is using a manual implementation based on ANTLR and C++, so actually we are executing
2011 Oct 30
3
element-by-element comparison
Hi, I have a vector and a matrix. For example, A = [ 12 3 4]; B = [ 4 13 10 2 4 8]; I am comparing A to each column of B using A>B[,ii], so the expected result is C = [ 1 0 0 1 0 0]; I am looking for a way to do this quickly instead of going through the for loop, but haven't had any luck yet? Any advice is appreciated. Thank you very much. Wendy