G'Day again,
I am attempting to read a large MSAccess file into R, but get memory
problems. With the first 100 rows of the table ("Macca99") things, as
shown below, are fine and the resulting object is 33,780 bytes. But when I
read the entire table ("MaccaDiv99") which is 218,000 rows R falls
over
with the message:
Rgui.exe - Application error
The instruction at "0x025d0458" referenced memory at
"0x0000003a".
The memory could not be "read"
My arithmetic suggests that the resulting object should have been about
33,708 * 218,000 / 100 = c. 74 Mbytes. I'm running Win NT with 256 Mbyte
memory so I was expecting to be able to read in the entire table. Or am I
being hopelessly naive?
Many thanks
Bernie McConnell
> library (RODBC)
> options("dec",".")
$dec
[1] "."
$.
NULL
> theChannel <- odbcConnect("Ellies", "",
"")
> p <- sqlFetch(theChannel, "Macca99")
> odbcClose(theChannel)
[1] 1> object.size(p)
[1] 33780>
> R.Version()
$platform
[1] "i386-pc-mingw32"
$arch
[1] "x86"
$os
[1] "Win32"
$system
[1] "x86, Win32"
$status
[1] ""
$major
[1] "1"
$minor
[1] "2.2"
$year
[1] "2001"
$month
[1] "02"
$day
[1] "26"
$language
[1] "R"
Bernie McConnell
NERC SEA MAMMAL RESEARCH UNIT
Gatty Marine Lab, St Andrews University
St Andrews, Fife, KY16 8LB, Scotland.
b.mcconnell at smru.st-andrews.ac.uk
http://www.smru.st-and.ac.uk
tel: +44 (1334) 463280
fax: +44 (1334) 462632
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Thu, 10 May 2001, Bernie McConnell wrote:> G'Day again, > > I am attempting to read a large MSAccess file into R, but get memory > problems. With the first 100 rows of the table ("Macca99") things, as > shown below, are fine and the resulting object is 33,780 bytes. But when I > read the entire table ("MaccaDiv99") which is 218,000 rows R falls over > with the message: > > Rgui.exe - Application error > The instruction at "0x025d0458" referenced memory at "0x0000003a". > The memory could not be "read" > > My arithmetic suggests that the resulting object should have been about > 33,708 * 218,000 / 100 = c. 74 Mbytes. I'm running Win NT with 256 Mbyte > memory so I was expecting to be able to read in the entire table. Or am I > being hopelessly naive?Probably. R certainly requires several times the size of the final object for these operations. Try reading it in pieces, or set "as" to read it as a matrix and then convert. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Dear all, I would like to know if the following behaviour is what one would expect ? (I am running R-1.2.3 (I know I'd better upgrade) under Linux). It seems a data.frame with only one column becomes a special case.... and I cannot figure out why (I'd see no problem in being told to rtfm, I could not find anything about that in the help pages)> a <- data.frame(c(1:3),row.names=c("c","a","b")) > ac.1.3. c 1 a 2 b 3> a[order(row.names(a)),][1] 2 3 1 ...kinda odd, especially since the following give what I'd expect....> a <- data.frame(cbind(c(1:3),c(3:5)),row.names=c("c","a","b")) > aX1 X2 c 1 3 a 2 4 b 3 5> a[order(row.names(a)),]X1 X2 a 2 4 b 3 5 c 1 3 Cheers, Laurent -- Laurent Gautier CBS, Building 208, DTU PhD. Student D-2800 Lyngby,Denmark tel: +45 45 25 24 85 http://www.cbs.dtu.dk/laurent -------------- next part -------------- An HTML attachment was scrubbed... URL: https://stat.ethz.ch/pipermail/r-help/attachments/20010709/8e9f5616/attachment.html