[R] reading only some columns from a table

Gabor Grothendieck ggrothendieck at gmail.com
Mon Oct 30 10:48:34 CET 2006


See the colClasses argument of read.table.

e.g.

   read.table("myfile", header = TRUE, colClasses = c(person = NULL))

assuming you don't want the column labelled person in the header.

On 10/30/06, Amir Safari <amsa36060 at yahoo.com> wrote:
>
>
>    Dear R users,
>  Sometimes it is needed to read only some columns from a table, in  particulare for high frequency data. How it is possible to read just  some certain columns using read.table ( ). The reason could be keeping  space in R and in particular accelerating in reading data when the  number of rows are huge and some of them are not needed.
>  Thank you very much,
>  Amir
>
>
> ---------------------------------
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list