[BioC] extracting specific columns from a table
Saroj K Mohapatra
saroj at vt.edu
Sat May 2 18:13:58 CEST 2009
Hi Dhaarini:
You combine all the column indices to a new vector using the function "c"
col.indices = c(1:5,243:291)
newdat = datrma[,col.indices]
Hope it helps,
Saroj
dhaarini s wrote:
> Hi all!
> I am new to R. I have a table with 291 columns totally. I would just like to
> extract columns 1 to 5 and columns 243 to 291. I am now able to extract
> columns 1 to5 separately or columns 243 to 291 separately. But I am not able
> to extract together columns 1 to 5 and columns 243 to 291.
> The command which i gave was
>
>> datrma[,1:5]
>> datrma[,243:291](datrma is my object containing the table)
>>
> Please suggest me a command so that i can extract these columns together.
> Expecting your reply. Thanks in advance!
> Regards,
> S.Dhaarini
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
>
>
More information about the Bioconductor
mailing list