Description Usage Arguments Details Note See Also Examples
save.ffdf
saves all ffdf data.frames in the given dir
. Each column
is stored as with filename <ffdfname>$<colname>.ff. All variables given in "..." are stored in ".RData" in the same directory.
The data can be reloaded by starting a R session in the directory or by using load.ffdf
.
Note that calling save.ffdf
multiple times for the same directory
will only store the ffdf's that were given in the last call.
1 2 3 4 5 6 7 |
... |
|
dir |
path where .RData file will be saved and all columns of supplied |
clone |
should the ff vectors be |
relativepath |
|
overwrite |
|
Using save.ffdf
automagically sets the finalizer
s of the ff
vectors to "close"
. This means that the data will be preserved on disk when the
object is removed or the R sessions is closed. Data can be deleted either using
delete
or by removing the directory where the object were saved
(dir
).
When saving in the temporary directory pointed at by getOption("fftempdir"), ff
assumes that the
resulting files are to be deleted. Be sure to change the finalizers of the
ff vectors when saving in the temporary directory.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | iris.ffdf <- as.ffdf(iris)
td <- tempfile()
# save the ffdf into the supplied directory
save.ffdf(iris.ffdf, dir=td)
# what in the directory?
dir(td)
#remove the ffdf from memory
rm("iris.ffdf")
# and reload the stored ffdf
load.ffdf(dir=td)
tf <- paste(tempfile(), ".zip", sep="")
packed <- pack.ffdf(file=tf, iris.ffdf)
#remove the ffdf from memory
rm("iris.ffdf")
# restore the ffdf from the packed ffdf
unpack.ffdf(tf)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.