Re: [R] Select certain elements from dataframe

From: Sebastian Eck <>
Date: Tue, 20 May 2008 04:20:59 -0700 (PDT)


sd_all_clusterX<-sd_all[(as.character(clusterX)%in%as.character(sd_all$X)),] again selects everything from sd_all, whereas

sd_all_clusterX<-sd_all[(as.character(sd_all$X)%in%as.character(ClusterX)),] results in sd_all_clusterX having 681 entries, what is smaller than the whole dataset (707 entries) but much larger than the actual 127 clusterelements I want to select.

Tank you that you are trying to solve the problem, and sorry for the trouble, I included a sample for my data now: Cluster: clusterX sd_all_sample: sd_all_sample

Again thank you for your help,


View this message in context:
Sent from the R help mailing list archive at

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Tue 20 May 2008 - 11:28:49 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 20 May 2008 - 13:30:40 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive