Re: [R] Adding rows to column

2010-10-21 Thread 1Rnwb
If I understand correctly you want to create a new dataframe with selected columns which can be achieved this was as well, it will right away create a new dataframe with column headers df2<-df1[ ,c(3,7,9,11,13,15)] -- View this message in context: http://r.789695.n4.nabble.com/Adding-rows-to-c

Re: [R] Adding rows to column

2010-10-21 Thread 1Rnwb
sorry i got clik happy df2<-df1[, c(3,5,7,9,11,13,15)] df2<-df2[grep('ID', df2$Group), ] -- View this message in context: http://r.789695.n4.nabble.com/Adding-rows-to-column-tp3005607p3006302.html Sent from the R help mailing list archive at Nabble.com. ___

Re: [R] Adding rows to column

2010-10-21 Thread Ivan Calandra
Hi! Would df<- table2[grep("ID",table2[,1]), c(7,9,11,13,15)] do what you expect? Ivan Le 10/21/2010 15:42, amb1networks a écrit : I'm new to R. I'm extracting important columns from single table using following code: File2<-"file.txt" table2<- read.delim(File2, skip=19, sep=";", header=