Question

I am working with large matrix on R and I try to use the ff package to manipulate them.

I have a loop which will create n (n can be size 1000) matrix called Var_sim (dim 25*7303)
I want to save the matrix in the disk (for example in my documents) with the ff format. After that if I need to read one of the n matrix I want to load it with R and ffload. This is my code:

    ffmat <- as.ff(Var_sim)
    ffsave(ffmat, file="/home/username/Documents/Data")

But nothing appears in Data: I don't know if ffsave is the function I am looking for. Moreover I don't know how to specify the name of the file which will be create.

Thanks for helping

Was it helpful?

Solution

You need to specify the file name you want to save it as instead of just giving the directory name, e.g.

ffsave(ffmat, file="/home/username/Documents/Data/ffmat1")
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top