View source: R/hdf5-functions.R
| h5Backup | R Documentation |
Function to back up HDF5 file, with optionally excluding specific links.
h5Backup(
from.file,
to.file = NULL,
exclude = NULL,
overwrite = FALSE,
verbose = TRUE,
...
)
from.file |
The source HDF5 file. |
to.file |
The target HDF5 file. Cannot be the same file as
|
exclude |
Names of HDF5 links not to be backed up. |
overwrite |
When the |
verbose |
Print progress. |
... |
Arguments passed to |
When any HDF5 link is to be excluded, it will copy the rest of links from
from.file using h5Copy. Otherwise, it will simply copy
the from.file to the to.file via file.copy
Path of the to.file
file <- system.file("extdata", "pbmc_small.h5ad", package = "hdf5r.Extra")
to.file <- tempfile(fileext = ".h5")
h5Backup(file, to.file, exclude = "X")
x <- h5Read(file)
x2 <- h5Read(to.file)
x$X <- NULL # Remove 'X'
identical(x, x2) # Now these two should be identical
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.