View source: R/hdf5-functions.R
h5Move | R Documentation |
Move one HDF5 link to another position within the same file.
h5Move(file, from.name, to.name, overwrite = FALSE, verbose = TRUE, ...)
file |
An HDF5 file. |
from.name |
Name of the source link. |
to.name |
Name of the destination link. |
overwrite |
When |
verbose |
Print progress. |
... |
Arguments passed to |
This is an operation function and no return. Any failure should raise an error.
H5File
file <- system.file("extdata", "pbmc_small.h5ad", package = "hdf5r.Extra")
to.file <- tempfile(fileext = ".h5")
file.copy(file, to.file)
obs <- h5Read(to.file, "obs")
h5Move(to.file, "obs", "obs2")
obs2 <- h5Read(to.file, "obs2")
# Move an object to an existing link
h5Move(to.file, "obs2", "var") # Warning
h5Move(to.file, "obs2", "var", overwrite = TRUE)
# Move a non-existing object will raise an error
try(h5Move(to.file, "obs", "obs3"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.