h5Overwrite {hdf5r.Extra}R Documentation

Overwrite an existing HDF5 link

Description

Overwrite an existing HDF5 link

Usage

h5Overwrite(file, name, overwrite)

Arguments

file

An existing HDF5 file

name

Name of HDF5 link to be overwritten.

overwrite

Whether or not to overwrite name.

Details

Value

Path to file which is ready to be written.

Examples

file <- system.file("extdata", "pbmc_small.h5ad", package = "hdf5r.Extra")
tmp.file <- tempfile(fileext = ".h5")
file.copy(file, tmp.file)

obs <- h5Read(tmp.file, "obs")

h5Overwrite(tmp.file, "layers", TRUE)
stopifnot(!h5Exists(tmp.file, "layers"))

# You can still read other links.
obs2 <- h5Read(tmp.file, "obs")
stopifnot(identical(obs, obs2))


[Package hdf5r.Extra version 0.0.6 Index]