[R] create data set from selection of rows

e-letter inpost at gmail.com
Tue Mar 15 16:09:56 CET 2011


Readers,

For a data set:

text1,23,text2,45
text1,23,text3,78
text1,23,text3,56
text1,23,text2,45

The following command was entered:

datasubset<-data.frame(dataset[,3]=="text3")

The result of

datasubset

is

TRUE
TRUE

The required result is

text1,23,text3,78
text1,23,text3,56

What is the correct command to use please?

Thanks in advance.



More information about the R-help mailing list