[Rd] memory problem read.table v array (PR#9526)

wlangdon at essex.ac.uk wlangdon at essex.ac.uk
Thu Feb 22 16:09:46 CET 2007


Full_Name: bill langdon
Version: 2.4.1
OS: ubuntu
Submission from: (NULL) (155.245.58.159)


#WBL 22 Feb 2007 ubuntu 
R.version
#platform       i486-pc-linux-gnu
#arch           i486
#os             linux-gnu
#system         i486, linux-gnu
#status
#major          2
#minor          4.1
#year           2006
#month          12
#day            18
#svn rev        40228
#language       R
#version.string R version 2.4.1 (2006-12-18)

#if matrix "a" is created by array "vals" is created ok

#if matrix "a" is created by read.table,
#peak resource use (CPU, memory) by "array()" is excessive

#a = array(0,dim=c(409600,1));                        #ok
#a = read.table("big.txt",header=FALSE);              #all memory used 
#a = read.table("639x639.txt",header=FALSE);          #all memory used 
#a = read.table("4096.txt",header=FALSE);             #all memory used 
#a = read.table("4096nocomment.txt",header=FALSE);    #all memory used 
#a = read.table("tiny.txt",header=FALSE);             #ten lines ok
#a = read.table("1000.txt",header=FALSE);             #all memory used 
a = read.table("639.txt",header=FALSE);               #uses 1.6047029GB
dim(a)
dd = 639;
vals = array(a,dim=c(dd,dd));



More information about the R-devel mailing list