[R] Saving a big table or matrix

Atte Tenkanen attenka at utu.fi
Fri Feb 1 14:23:40 CET 2008


I had a problem:

I saved a matrix:

> save(Tondistmatrix1, file="/Users/atte/Skriptit/Tondistmatrix1")

then I tried to open it with R:
> Tondistmatrix1=load("/Users/atte/Skriptit/Tondistmatrix1")
> Tondistmatrix1[1:10,]
Error in Tondistmatrix1[1:10, ] : incorrect number of dimensions
> dim(Tondistmatrix1)
NULL

So, this didn't work but then I noticed that this is enough

> load("/Users/atte/Skriptit/Tondistmatrix1")
> dim(Tondistmatrix1)
[1] 3938 3938

No problems any more...

Atte Tenkanen
University of Turku, Finland
Department of Musicology
+023335278

----- Original Message -----
From: Gabor Csardi <csardi at rmki.kfki.hu>
Date: Friday, February 1, 2008 1:43 pm
Subject: Re: [R] Saving a big table or matrix

> ?save
> ?load
> 
> Gabor
> 
> ps. although i'm not sure what an Rdata-project means, so maybe you
> need something else
> 
> On Fri, Feb 01, 2008 at 08:24:32AM +0200, Atte Tenkanen wrote:
> > Dear R-users,
> > 
> > How do you save a big table or matrix as an independent object 
> and attach it to your Rdata-project when needed?
> > 
> > Atte Tenkanen
> > University of Turku, Finland
> > Department of Musicology
> > +023335278
> > 
> > ______________________________________________
> > R-help at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html> and provide commented, minimal, self-contained, 
> reproducible code.
> 
> -- 
> Csardi Gabor <csardi at rmki.kfki.hu>    UNIL DGM
>



More information about the R-help mailing list