[R] saving large matrices with decimal numbers

Moreno Ignazio Coco M.I.Coco at sms.ed.ac.uk
Fri Sep 4 11:27:18 CEST 2009


Hi everybody,

I am struggling to save txt. or csv. large sparse matrices (1024 X 768  
image size), initialized at 0.1.

  image1[0:10,0:10]
       [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
  [1,]  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1   0.1
  [2,]  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1   0.1
  [3,]  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1   0.1
  [4,]  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1   0.1
  [5,]  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1   0.1
  [6,]  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1   0.1
  [7,]  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1   0.1
  [8,]  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1   0.1
  [9,]  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1   0.1
[10,]  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1  0.1   0.1

with small distributions located at different points of matrix.
If I try the same matrix but initialized at 0, it can save it.

It seems that R manages to save up around 800 X 600 decimal matrices  
but for bigger sizes the output is an empty file. Does anyone know  
whether there is a limit in saving such matrices and how can I work  
around this problem?

Thanks a lot,

Regards,

Moreno



-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.




More information about the R-help mailing list