View source: R/write_pvolfile.R
write_pvolfile | R Documentation |
pvol
) object to ODIM HDF5 fileWrite a polar volume (pvol
) object to ODIM HDF5 file
write_pvolfile(pvol, file, overwrite = FALSE, infer_dtype = FALSE)
pvol |
An object of class |
file |
string. A filepath to write the |
overwrite |
logical. Overwrites existing file when TRUE. |
infer_dtype |
logical. By default (infer_dtype = FALSE) writes 'params' back into ODIM HDF5 files with data stored in original data types. When TRUE infers data type from the R object data type, at the cost of (heavily) inflated file sizes. |
0 on success. A pvol
object will be written to file in ODIM H5 format.
# locate example volume file:
pvolfile <- system.file("extdata", "volume.h5", package = "bioRad")
# load the file:
example_pvol <- read_pvolfile(pvolfile)
# write the file:
pvolfile_out <- paste0(tempdir(),"pvolfile_out.h5")
write_pvolfile(example_pvol, pvolfile_out)
# clean up
file.remove(pvolfile_out)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.