Description Usage Arguments Value Functions Examples
Read a dataset or attribute from an HDF file into memory.
Generic helper for reading HDF objects into memory.
1 2 3 4 5 6 7 | hql_read(what = c("DATASET", "ATTRIBUTE"), path, parallel = FALSE)
hql_read_dataset(path, include.attributes = TRUE, parallel = FALSE)
hql_read_attribute(path, parallel = FALSE)
hql_read_all_attributes(path, parallel = FALSE)
|
path |
The location of the dataset, attribute, or group within the HDF file. |
parallel |
Use parallel processing functionality. |
include.attributes |
If |
A matrix.
The attribute value.
A named list of attributes.
hql_read_dataset
: Read a dataset from an HDF file.
hql_read_attribute
: Read a single attribute from an HDF file.
hql_read_all_attributes
: Read attributes from an HDF file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | if(hql_is_loaded()){
tf = tempfile(fileext = ".h5")
hql_create_file(tf)
hql_use_file(tf)
x = matrix(rnorm(100), nrow = 20)
hql_write_dataset(x, "dataset0")
hql_write_attribute("normal", "dataset0/dist")
y = month.name
attr(y, "abbreviation") = month.abb
attr(y, "number") = 1:12
hql_write_dataset(y, "group1/dataset1")
hql_read_dataset("dataset0")
hql_read_dataset("group1/dataset1")
hql_read_attribute("group1/dataset1/abbreviation")
hql_read_all_attributes("group1/dataset1")
hql_close_file(tf)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.