file <- tempfile(fileext = ".h5")
h5_write(1:10, file, "group/dataset")
# Review the file structure
h5_str(file)
# Rename within the same group
h5_move(file, "group/dataset", "group/renamed")
# Review the file structure
h5_str(file)
# Move to a new group (creates parent automatically)
h5_move(file, "group/renamed", "archive/dataset")
# Review the file structure
h5_str(file)
unlink(file)
Run the code above in your browser using DataLab