[R] use read.table for a partial reading

Henrique Dallazuanna wwwhsd at gmail.com
Sat Apr 10 18:16:52 CEST 2010


Try this also:

your_data <- read.table('your_file.txt', colClasses = c('character',
'character', rep(NULL, 18)))

On Thu, Apr 8, 2010 at 11:05 AM, Covelli Paolo <pcovelli at tele2.it> wrote:
> Hi everyone,
>
> I've got a matrix data with 20 variables (V1, V2, V3, ...) and 215 rows
> (observations). I'm interested to read only the first and second variables
> using "read.table" function. How can I do?
>
> Thanks in advance.
>
> Paolo.
>
> ______________________________________________
> R-help at r-project.org 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.
>



-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O



More information about the R-help mailing list