Re: [R] Select certain elements from dataframe

2008-05-20 Thread jim holtman
Is this what you want: It turns out that clusterX was a dataframe - > sd_all[sd_all$X %in% clusterX$X,] X mydata.mean.a mydata.mean.x mydata.sd.a mydata.sd.x mydata.log2.mean.a mydata.log2.mean.x 3 VS_0225 2.00 1.330.170.14 -0.01 -0.59 6

Re: [R] Select certain elements from dataframe

2008-05-20 Thread Sebastian Eck
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 e

Re: [R] Select certain elements from dataframe

2008-05-20 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 20.05.2008 11:43:07: > > > sd_all_clusterX<-sd_all[(clusterX%in%sd_all$X),] # not tested > > seems to do nothing, all elements of the original dataframe are now selected OK you made me to test it. As you do not provided reproducible example I used some of my

Re: [R] Select certain elements from dataframe

2008-05-20 Thread jim holtman
It would help if you would post a reproducible subset of your data. Use 'dput' if including it in the text. All we can do is make a guess since you have not even include 'str(sd_all)' so we know the structure of your data. sd_all_clusterX<-sd_all[(as.character(clusterX)%in%as.character(sd_all$X)

Re: [R] Select certain elements from dataframe

2008-05-20 Thread Sebastian Eck
sd_all_clusterX<-sd_all[(clusterX%in%sd_all$X),] # not tested seems to do nothing, all elements of the original dataframe are now selected Petr Pikal wrote: > > Hi > > [EMAIL PROTECTED] napsal dne 20.05.2008 10:25:00: > >> >> First of all thank you very much, that helped a lot! >> >>

Re: [R] Select certain elements from dataframe

2008-05-20 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 20.05.2008 10:25:00: > > First of all thank you very much, that helped a lot! > > Now I have another related problem, again I want to limit a dataframe on > certain elements, the dataframe looks like this: > > colnames(sd_all) > [1] "X""m

Re: [R] Select certain elements from dataframe

2008-05-20 Thread Sebastian Eck
First of all thank you very much, that helped a lot! Now I have another related problem, again I want to limit a dataframe on certain elements, the dataframe looks like this: > colnames(sd_all) [1] "X""mydata.a" [3] "mydata.x""mydata.sd.a" . . . [13] "mydata.mad.

Re: [R] Select certain elements from dataframe

2008-05-19 Thread jim holtman
'xx1' is a 'factor' and you have to convert to a character before selecting: data.xx1<-data[ ,as.character(xx1)] On Mon, May 19, 2008 at 5:20 AM, SebastianEck <[EMAIL PROTECTED]> wrote: > > Hello, > > I have a specific problem, I have a large dataframe, and after clustering I > want to select ce

[R] Select certain elements from dataframe

2008-05-19 Thread SebastianEck
Hello, I have a specific problem, I have a large dataframe, and after clustering I want to select certain colums, the elements of a subcluster. My dataframe looks like this : > colnames(data) [1] "101KF4319097339" "102KF4319101170" "103KF4319047549" "104KF4319046389" [5] "105KF4319013260" "