On Wed, Aug 15, 2012 at 8:11 AM, Fatemehsadat Seyednasrollah
<fatsey@utu.fi>wrote:

> Hello all,
>
> I have a text tab delimitated file from 100 biological samples with the
> names of samples as the names of columns.
> What is the memory efficient way of extracting only some specific
> columns(samples) and working on them?
> Should I make a new file of that and work with the new file like :
> new <- read.table (myfile, header = T ) [ , c(column names)]
>
>
Have a look at the colClasses argument to read.table().  You could, for
example, read the first few lines of the file to get the header (using
nrows), figure out which columns to read based on that, and then set the
colClasses accordingly to read the full table.

Sean


> and then write this new to a new file?
> Thank you in advance
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>

	[[alternative HTML version deleted]]

