| hdf5_close_file | R Documentation |
Closes all open HDF5Matrix objects and HDF5 C library handles
associated with a single HDF5 file, without affecting other open files.
hdf5_close_file(x)
x |
An |
Invisibly, the absolute path of the closed file.
hdf5_close_all to close all files at once.
fn1 <- tempfile(fileext = ".h5")
fn2 <- tempfile(fileext = ".h5")
A <- hdf5_create_matrix(fn1, "data/A", data = matrix(1:9, 3, 3))
B <- hdf5_create_matrix(fn2, "data/B", data = matrix(1:9, 3, 3))
# Close only fn1 — B remains open and usable
hdf5_close_file(fn1)
dim(B) # still works
hdf5_close_all()
unlink(c(fn1, fn2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.