GOT IT Re: [BioC] to extract just some columns of an exprsSet

Florence Combes florence.combes at paris7.jussieu.fr
Thu Sep 23 12:36:52 CEST 2004


In fact I just found out (one of) the way to do it, really sorry for this 
everybody.

I put there my command line if it can be useful for someone....

let's say you have the label(s) of the column(s) you want to extract in a 
variable called "ext", and that the exprSet object is called "eset" , I 
think you can do you can do:

 > extracted <- exprs(eset[, ext])

apologize again,

Florence.




>Dear all,
>
>I have a programming problem with R, but in connection with arrays:
>My goal is to extract just some columns (for which I have the label of 
>each) of an object of exprsSet type: the resulting object of the 
>expresso() command from the affy package.
>
>To be precise, let's say that I have 12 arrays, so my exprsSet object is a 
>matrix of some thousands  of lines by 12 columns.
>
>My problem is that I don't have the rank of the columns I want to extract, 
>but just the labels.
>Let's say I have a matrix of 12 colums labelled "sample1" to sample12". I 
>want to extract the columns labelled "sample1", sample4" and sample6", 
>which are non contiguous on my exprsSet matrix, in order to create a new 
>matrix with these columns only.
>
>I do not know how to obtain the indices (coordonates is maybe better?) of 
>these 3 columns.
>I think that when I will have these indices I will the be possible to use 
>the subset() command ?
>
>Does anyone could help me with this, because it seems I won't be able to 
>do ....
>
>Thanks a lot for your help,
>
>Florence.
>
>_______________________________________________
>Bioconductor mailing list
>Bioconductor at stat.math.ethz.ch
>https://stat.ethz.ch/mailman/listinfo/bioconductor



More information about the Bioconductor mailing list