Skip to content
Back to formatted view

Raw Message

Message-ID: <06c6fc5814ce66cf41e00380e9e082a2.squirrel@webmail.andrew.cmu.edu>
Date: 2009-11-25T01:28:44Z
From: Hao Cen
Subject: questions on the ff package

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