search for: rwnames

Displaying 2 results from an estimated 2 matches for "rwnames".

Did you mean: renames
2010 Dec 20
0
performance issue with merge
...200 2.71 NA 1.34 ID1_300 0.92 1.22 NA ... Merging works as long I do not set the all.x and all.y directive in the merge command: DF <- data.frame(NULL) count=0 filenames <- list.files() filenames for(i in filenames) { count<-count+1 tmp <- read.delim(i, header=FALSE) rwnames <- paste(tmp[,1], tmp[,2], sep="_") tmp<-tmp[,3] tmp<-as.matrix(tmp) rownames(tmp)<-rwnames if (count == 1) { DF <- tmp } else { DF <- merge(DF, tmp, by="row.names",all.x = TRUE, all.y = TRUE) rownames(DF)<-DF$Row.names DF<-DF[,2:ncol(DF)] }...
2005 Oct 20
3
Attributing values to matrix according to names
Dear R-helpers Apologies for the basic question, but I just got stuck: I would like to write values from a vector into array cells with the same names > count[1:10] 10010 10014 10015 10017 10030 10080 10100 10230 10250 10280 0 0 0 0 0 1 1 0 2 0 >data[1:10,,1] [,1] [,2] [,3] [,4] [,5] 10010 NA NA NA NA NA 10014 NA NA NA