[R-sig-hpc] Q: ffsave/ffload between Linux and Windows
Jens Oehlschlägel
Jens.Oehlschlaegel at truecluster.com
Wed Jan 14 15:49:30 CET 2015
Patrick,
I don't have a quick solution using ffsave/ffload. However, are you
aware that you can open an ff file from a previous session just by
a) make sure the ff file is not removed upon session end (create it
outside fftemp)
b) make sure you have stored the R side ff object
Look at this:
# create ff outside fftemp
> x <- ff(1:12, file="fftest")
# see finalizer changed from 'delete' to 'close'
> finalizer(x)
[1] "close"
# see filename
> filename(x)
[1] "C:/Users/jens/Documents/fftest"
# close file
> close(x)
[1] TRUE
# plug-in wrong filepathname but do not use: filename(x) <- newname
> physical(x)$filename <- "C:/Users/jens/Documents/fftest2"
# try open: can't find file anymore
> open(x)
Fehler: file.access(filename, 0) == 0 ist nicht TRUE
> x
ff (deleted) integer length=12 (12)
# plug-in correct filepathname but do not use: filename(x) <- newname
> physical(x)$filename <- "C:/Users/jens/Documents/fftest"
> open(x)
[1] TRUE
> x
ff (open) integer length=12 (12)
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]
1 2 3 4 5 6 7 8 9 10 11 12
With this you can easily migrate any ff objects to new locations
HTH
Jens
Am 10.01.2015 18:45, schrieb Patrick Zhang:
> Dear Jens,
>
> My name is Patrick, a new user of your fantastic ff package. Here is my
> quick question.
>
> I want to move ff data archives between Linux and Windows, and have
> tried a couple of different approaches including ffsave/ffload without
> success. It seems to me that the different directory structure between
> the two operating systems is preventing a smooth transfer. In the ff
> archives, the absolute path is used as the storage parameter.
>
> Your assistance on this matter would be highly appreciated. Thank you!
>
> Best regards,
> Patrick
More information about the R-sig-hpc
mailing list