0

I have a question about ffsave(from ff package).

I have a large matrix that I save like this:

ffsave(Mat, file=paste(results_wd,"Mat",sep=""), rootpath=results_wd)
rm(Mat)
gc()

In my folder (results_wd) I have "Mat.ffData", "Mat.RData" and "clone28b4d345101.ff"

And when I load my matrix:

ffload(paste(results_wd,"Mat",sep=""))
opening ff /home/usr/Docs/Data/Analogs/Simul_arch_19582008/Precip/clone28b4d345101.ff
Warning:
In FUN("clone28b4d345101.ff"[[1L]], ...) :
NOTE: did not overwrite file 'clone2f3d73a2e574.ff'

So it loads data from clone28b4d345101.ff

The problem is that clone28b4d345101.ff size is 10Mo and I have 608*5 files like this so using ff is useless... Even if I close R, the files are still here (I thought it was something load with the workspace). When I delete these files, they come back when I use ffload.

Can't I use ffsave withouh having a file named clone(numbers).ff (just with name.ffData and name.RData)?

Chika
  • 1,455
  • 2
  • 16
  • 24
  • Some information: `ffsave` basically zips all ff files into 1 .ffData file. When you `ffload` it, it will unzip the files so that you can work with them. It will unzip these files in the location where they were created. Next to that ff objects have a finalizer (See ?finalizer), the default finalizer means that if you store your ff files outside of getOption(fftempdir), they will stay there even if you close R. Your file called clone.... was created already before issueing ffsave or ffload. Hope this helps. –  Mar 14 '14 at 16:36
  • Thank you for your answer. So I have the choice between keeping these files (31Go in all!) or remove the option and have temporary files in my disk (so I can't copy/paste the results in another computer)? – Chika Mar 24 '14 at 14:33

0 Answers0