Description Usage Arguments Details Value See Also Examples
Copy, move, rename and delete an Xdf file.
1 2 3 4 5 6 7 | copy_xdf(src, dest)
move_xdf(src, dest)
rename_xdf(src, dest)
delete_xdf(xdf)
|
src |
For |
dest |
For |
xdf |
For |
The copy_xdf
function copies the Xdf file given by src
to the location specified by dest
, possibly renaming it as well; move_xdf
moves the file. rename_xdf
does a strict rename (the location of the file is unchanged, only its name). delete_xdf
deletes the file given by xdf
.
These are utility functions for working with the files/directories where the data for an Xdf data source is stored. They make use of low-level OS functionality, so should be more efficient than running rxDataStep
. They work with both standard and composite Xdf files, and with data stored both in the native filesystem and in HDFS.
copy_xdf
, move_xdf
and rename_xdf
return an Xdf data source object pointing to the new file location. delete_xdf
returns TRUE if the delete operation succeeded, FALSE otherwise.
file.copy
, file.rename
, unlink
,
rxHadoopCopy
, rxHadoopMove
, rxHadoopRemove
, rxHadoopRemoveDir
1 2 3 4 5 6 7 8 9 10 | mtx <- as_xdf(mtcars, overwrite=TRUE)
mtx2 <- copy_xdf(mtx, "mtcars2.xdf")
head(mtx2)
delete_xdf(mtx2)
file.exists("mtcars2.xdf") # FALSE
mtx2 <- rename_xdf(mtx, "mtcars2.xdf")
file.exists("mtcars.xdf") # FALSE
file.exists("mtcars2.xdf") # TRUE
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.