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

About this list Date view Thread view Subject view Author view Attachment view

From: Till Baumgaertel (till.baumgaertel@epost.de)
Date: Wed 03 Apr 2002 - 01:32:05 EST


Message-id: <3C97A93300008C99@mail.epost.de>


>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@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Wed 16 Oct 2002 - 11:57:10 EST