[R] questions on the ff package

Ramon Diaz-Uriarte rdiaz02 at gmail.com
Wed Nov 25 12:02:52 CET 2009


Dear Jeff,

This is not exactly what you are asking, but what I do is close the
object, save it as RData, and then when I need to load the RData.  The
RData objects themselves are very small.

Best,

R.


On Wed, Nov 25, 2009 at 2:28 AM, Hao Cen <hcen at andrew.cmu.edu> wrote:
> Hi,
>
> I have two questions on using the ff package and wonder if anyone who used
> ff can share some thoughts.
>
> I need to save a matrix as a memory-mapped file and load it back later. To
> save the matrix, I use
>
> mat = matrix(1:20, 4, 5)
> matFF = ff(mat, dim=dim(mat), filename="~/a.mat", overwrite=TRUE, dimnames
> = dimnames(mat))
>
> To load it back, I use
> matFF2 = ff(vmode = "double", dim= ???, filename="~/a.mat", overwrite=F)
>
> However, I don't always know the dimension when loading the matrix back.
> If I miss the dim attributes, ff will return it as vector. Is there a way
> to load the matrix without specifying the dimension?
>
> The second question is that the matrix may grow in terms of the number of
> rows. I would like to synchronize the change to the memory-mapped file. Is
> there an efficient way to do this?
>
> Thanks
>
> Jeff
>
> ______________________________________________
> 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.
>



-- 
Ramon Diaz-Uriarte
Structural Biology and Biocomputing Programme
Spanish National Cancer Centre (CNIO)
http://ligarto.org/rdiaz
Phone: +34-91-732-8000 ext. 3019




More information about the R-help mailing list