[R] Select certain elements from dataframe

Sebastian Eck Sebastian.Eck at helmholtz-muenchen.de
Tue May 20 13:20:59 CEST 2008


Hi,

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:  http://www.nabble.com/file/p17338101/clusterX clusterX 
sd_all_sample:  http://www.nabble.com/file/p17338101/sd_all_sample
sd_all_sample 

Again thank you for your help,

Sebastian






-- 
View this message in context: http://www.nabble.com/Select-certain-elements-from-dataframe-tp17314209p17338101.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list