Re: [R] create data set from selection of rows

From: Mohamed Lajnef <Mohamed.lajnef_at_inserm.fr>
Date: Tue, 15 Mar 2011 16:44:51 +0100

Hi,

Le 15/03/11 16:09, e-letter a écrit :
> 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")
datasubset<-subset(dataset,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.

> Regards

M

> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
####################################
Mohamed Lajnef,IE INSERM U955 eq 15#
Pôle de Psychiatrie 		   #	
Hôpital CHENEVIER                  #
40, rue Mesly                      #
94010 CRETEIL Cedex FRANCE         #
Mohamed.lajnef_at_inserm.fr           #
tel : 01 49 81 32 79		   #
Sec : 01 49 81 32 90               #
fax : 01 49 81 30 99               #
####################################



	[[alternative HTML version deleted]]


______________________________________________ R-help_at_r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Received on Tue 15 Mar 2011 - 15:59:15 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 15 Mar 2011 - 16:00:22 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive