hql_read: Read HDF Dataset or Attribute

Description Usage Arguments Value Functions Examples

View source: R/read.r

Description

Read a dataset or attribute from an HDF file into memory.

Generic helper for reading HDF objects into memory.

Usage

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)

Arguments

path

The location of the dataset, attribute, or group within the HDF file.

parallel

Use parallel processing functionality.

include.attributes

If TRUE, include the dataset attributes.

Value

A matrix.

The attribute value.

A named list of attributes.

Functions

Examples

 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)
}

hdfqlr documentation built on June 11, 2021, 9:08 a.m.

Related to hql_read in hdfqlr...