[R] AW: Re: [R] "Large" data set: performance issue

Till Baumgaertel till.baumgaertel at epost.de
Tue Apr 2 17:32:05 CEST 2002


>What happens if you try this?:
>
>datfull <- read.csv("foo", colClasses=rep(c("character","numeric"),c(22,1801)))

nope, sorry. it's not working.
it complains about the following:
####
Error in scan(file = file, what = what, sep = sep, quote = quote, dec =
dec,  : 
        "scan" expected a real, got ""+1073741824""
####

ok, i forgot to tell you my numbers are just like the characters quoted
("\""). sorry!

therefore i tried
###
datfull <- read.csv2(file.choose(), colClasses=rep(c("character","numeric"),c(22,1801)),quote="\"",sep=",")
###

But it's still not working.

it seems to be critical to do the translation of character ("+1234") to
numeric(1234.0) AFTER the file was totally read into (any kind of?) a data
structure. 

It seems I really  have to write an external (PERL-)programm, but that's
not exactly what I wanted, because read.table() does the job quite good
(despite the fact ot's not capable of handling large data sets).

but thank you for your help,
till




________________________________________



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list