# \donttest{
fn <- tempfile(fileext = ".h5")
# Create a dataset to move
hdf5_create_matrix(fn, "old_group/my_dataset",
data = matrix(rnorm(100), 10, 10))
# Move dataset to a different group
res <- bdmove_hdf5_dataset(fn,
source_path = "old_group/my_dataset",
dest_path = "new_group/my_dataset")
# Rename dataset within the same group
hdf5_create_matrix(fn, "data/old_name",
data = matrix(rnorm(100), 10, 10))
res <- bdmove_hdf5_dataset(fn,
source_path = "data/old_name",
dest_path = "data/new_name")
hdf5_close_all()
unlink(fn)
# }
Run the code above in your browser using DataLab