Movatterモバイル変換


[0]ホーム

URL:


Type:Package
Title:Interface to the 'HDF5' Binary Data Format
Version:1.3.12
Description:'HDF5' is a data model, library and file format for storing and managing large amounts of data. This package provides a nearly feature complete, object oriented wrapper for the 'HDF5' APIhttps://support.hdfgroup.org/documentation/hdf5/latest/_r_m.html using R6 classes. Additionally, functionality is added so that 'HDF5' objects behave very similar to their corresponding R counterparts.
URL:https://hhoeflin.github.io/hdf5r/,https://github.com/hhoeflin/hdf5r/
BugReports:https://github.com/hhoeflin/hdf5r/issues
License:Apache License 2.0 | file LICENSE
Copyright:For the hdf5r package: Novartis Institute for BioMedicalResearch Inc. For HDF5: see the HDF5_COPYRIGHTS file.
LazyLoad:true
Depends:R (≥ 3.2.2), methods
Imports:R6, bit64, utils
Suggests:testthat, knitr, rmarkdown, nycflights13, reshape2, formatR,
SystemRequirements:HDF5 (>= 1.8.13)
VignetteBuilder:knitr
NeedsCompilation:yes
RoxygenNote:6.1.1.9000
Collate:'Common_functions.R' 'Compound.R' 'H5constants.R''Helper_functions.R' 'Misc.R' 'R6Classes.R' 'R6Classes_H5A.R''R6Classes_H5D.R' 'R6Classes_H5File.R' 'R6Classes_H5Group.R''R6Classes_H5P.R' 'R6Classes_H5R.R' 'R6Classes_H5S.R''R6Classes_H5T.R' 'adapt_during_onLoad.R' 'convert.R''factor_ext.R' 'globalVariables.R' 'h5errorHandling.R''h5wrapper.R' 'hdf5r.R' 'high_level_UI.R' 'open_objs.R' 'zzz.R'
Packaged:2025-01-19 16:02:58 UTC; hhoeflin
Author:Holger Hoefling [aut, cre], Mario Annau [aut], Novartis Institute for BioMedical Research (NIBR) [cph]
Maintainer:Holger Hoefling <hhoeflin@gmail.com>
Repository:CRAN
Date/Publication:2025-01-20 11:00:05 UTC

hdf5r: A package to provide an interface to hdf5 from R

Description

A package that allows to interface with the HDF5 C-library. Provides access to most of itsfunctionality from inside R using R6 classes. For more details please see the README atthe github pagehttps://github.com/hhoeflin/hdf5r.

Examples

test_file <- tempfile(fileext=".h5")file.h5 <- H5File$new(test_file, mode="w")data(cars)file.h5$create_group("test")file.h5[["test/cars"]] <- carscars_ds <- file.h5[["test/cars"]]h5attr(cars_ds, "rownames") <- rownames(cars)# Close the file at the end# the 'close' method closes only the file-id, but leaves object inside the file open# This may prevent re-opening of the file. 'close_all' closes the file and all objects in itfile.h5$close_all()# now re-open it file.h5 <- H5File$new(test_file, mode="r+")# lets look at the contentfile.h5$ls(recursive=TRUE)cars_ds <- file.h5[["test/cars"]]# note that for now tables in HDF5 are 1-dimensional, not 2-dimensionalmycars <- cars_ds[]h5attr_names(cars_ds)h5attr(cars_ds, "rownames")file.h5$close_all()

Retrieving a copy of a type

Description

Retrieving a copy of a type

Usage

## S3 method for class 'types_env'x$name## S3 method for class 'types_env'x[[name]]

Arguments

x

The environment to request it from

name

The name of the type that is requested

Details

The types are stored in the environmenth5types. These types should not be accesseddirectly. Therefor, the$-operator is overloaded to ensure that every type that is accessed is a copy of theoriginal type

Value

Returns an object that is a copy of a type that was requested

Author(s)

Holger Hoefling


Class for representing HDF5 attributes

Description

This class represents an HDF5 attribute. Usually it is easier to read and write attributes forgroups, datasets and committed datatypes using the functions documented inh5attributes.

Details

Otherwise, the functionality for attributes is very similar to that of datasets (H5D),however with the notable exception that attributes always have to be read and written as a whole.

Value

Object of classH5A.

Methods

get_info()

This function implements the HDF5-API function H5Aget_info.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_name()

This function implements the HDF5-API function H5Aget_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

get_space()

This function implements the HDF5-API function H5Aget_space.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

get_type(native = TRUE)

This function implements the HDF5-API function H5Aget_type.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

get_storage_size()

This function implements the HDF5-API function H5Aget_storage_size.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

read_low_level(buffer, mem_type, duplicate_buffer = FALSE)

Only for advanced users. See documentation forread instead.This function implements the HDF5-API function H5Aread.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

read(flags = getOption("hdf5r.h5tor_default"), drop = TRUE)

Reads the data of the attribute and returns it as an R-object

Parameters

flags

Conversion rules for integer values. See alsoh5const

drop

Logical. Should dimensions of length 1 be dropped (R-default for arrays)

write_low_level(buffer, mem_type)

Only for advanced users. See documentation forwrite instead.This function implements the HDF5-API function H5Awrite.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

write(robj, mem_type = NULL, flush = getOption("hdf5r.flush_on_write"))

Writes the data ofrobj to the attribute

Parameters

robj

The object to write into the attribute

mem_type

The memory data type to use when transferring from HDF5 to intermediate storage. This is an advanced development feature and may be removed in the future.

print(...)

Prints information for the dataset

Parameters

...

ignored

flush(scope = h5const$H5F_SCOPE_GLOBAL)

This function implements the HDF5-API function H5Fflush.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.

get_filename()

This function implements the HDF5-API function H5Fget_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.

Author(s)

Holger Hoefling

Examples

fname <- tempfile(fileext = ".h5")file <- H5File$new(fname, mode = "a")h5attr(file, "attr_numeric") <- rnorm(10)a <- file$attr_open("attr_numeric")a$get_info()a$attr_name()a$get_space()a$get_type()a$get_storage_size()a$read()a$write(10:1)a$print()a$close()file$close_all()

Class for representing HDF5 datasets

Description

In HDF5, datasets can be located in a group (seeH5Group) or at theroot of a file (seeH5File). They can be created either with a pre-existing R-object(arrays as well as data.frames are supported, but not lists or other complex objects), or by specifyingan explicit datatype (for available datatypes seeh5types$overview as well as the dimension.In addition, other features are supported such as transparent compression (for which a chunk-size can be selected).

Details

In order to create a dataset, thecreate_dataset methods of eitherH5Group orH5File should be used. Please see the documentation there for how to create them.

The most important parts of a dataset are the

Space

The space of the dataset. It describes the dimension of the dataset as well as the maximum dimensions.Can be obtained using theget_space of theH5S object.

Datatype

The datatypes that is being used in the dataset. Can be obtained using theget_type method.SeeH5T to get more information about using datatypes.

In order to read and write datasets, theread andwrite methods are available. In addition, the standard way of using[ to access arrays is supported as well (seeH5S_H5D_subset_assign for more help).

Other information/action of possible interest are

Storage size

The size of the dataset can be extracted usingget_storage_size

Size change

The size of the dataset can be changed using theset_extent method

Please also note the active methods

dims

Dimension of the dataset

maxdims

Maximum dimensions of the dataset

chunk_dims

Dimension of the chunks

key_info

Returns the space, type, property-list and dimensions

Value

Object of classH5D.

Methods

new(id = NULL)

Initializes a new dataset-object. Only for internal use. Use thecreate_dataset function forH5GroupandH5File objects

Parameters

id

For internal use only

get_space()

This function implements the HDF5-API function H5Dget_space.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for details.

get_space_status()

This function implements the HDF5-API function H5Dget_space_status.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for details.

get_type(native = TRUE)

This function implements the HDF5-API function H5Dget_type.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for details.

get_create_plist()

This function implements the HDF5-API function H5Dget_create_plist.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for details.

get_access_plist()

This function implements the HDF5-API function H5Dget_access_plist.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for details.

get_offset()

This function implements the HDF5-API function H5Dget_offset.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for details.

get_storage_size()

This function implements the HDF5-API function H5Dget_storage_size.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for details.

vlen_get_buf_size(type, space)

This function implements the HDF5-API function H5Dvlen_get_buf_size.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for details.

vlen_reclaim(buffer, type, space, dataset_xfer_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Dvlen_reclaim.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for details.

read_low_level(file_space = h5const$H5S_ALL, mem_space = NULL, mem_type = NULL, dataset_xfer_pl = h5const$H5P_DEFAULT, flags = getOption("hdf5r.h5tor_default"), set_dim = FALSE, dim_to_set = NULL, drop = TRUE)

This function is for advanced users. It is recommended to useread instead or the[ interface.This function implements the HDF5-API function H5Dread, with minor changes to the API to accommodate R.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for details.It reads the data in the dataset as specified bymem_space and return it as an R-obj

Parameters

file_space

An HDF5-space, represented as classH5S that determines which partof the dataset is being read. Can also be given as an id

mem_space

The space as it is represented in memory; advanced feature; may be removed in the future.Can also be given as an id.

mem_type

Memory type; extracted from the dataset if null (can be passed in for efficiency reasonsCan also be given as an id.

dataset_xfer_pl

Dataset transfer property list. SeeH5P_DATASET_XFER

flags

Conversion rules for integer values. See alsoh5const

set_dim

IfTRUE, the dimension attribute is set in the return value. How it is set is determined bydim_to_set.

dim_to_set

The dimension to set; Has to be numeric and needs to be specified ifset_dim isTRUE.If the result is a data.frame, i.e. the data-type is a compound, then the dimension is ignored as thecorrect dimension is already set.

drop

Logical. Should dimensions of length 1 be dropped (R-default for arrays)

read(args = NULL, dataset_xfer_pl = h5const$H5P_DEFAULT, flags = getOption("hdf5r.h5tor_default"), drop = TRUE, envir = parent.frame())

Main interface for reading data from the dataset. It is the function that is used by[, whereall indices are being passed in the parameterargs.

Parameters

args

The indices for each dimension to subset given as a list. This makes this easier to use as a programmatic API.For interactive use we recommend the use of the[ operator. If set toNULL, the entire dataset will be read.

envir

The environment in which to evaluateargs

dataset_xfer_pl

An object of classH5P_DATASET_XFER.

flags

Some flags governing edge cases of conversion from HDF5 to R. This is related to how integers are being treated andthe issue of R not being able to natively represent 64bit integers and not at all being able to represent unsigned 64bit integers(even using add-on packages). The constants governing this are part ofh5const. The relevant ones start with the termH5TOR and are documented there. The default set here returns a regular 32bit integer if it doesn't lead to an overflowand returns a 64bit integer from thebit64 package otherwise. For 64bit unsigned int that are larger than 64bit signed int,it return adouble. This looses precision, however.

drop

Logical. When reading data, should dimensions of size 1 be dropped.

Return

The data that was read as an R object

write_low_level(robj, file_space = h5const$H5S_ALL, mem_space = NULL, mem_type = NULL, dataset_xfer_pl = h5const$H5P_DEFAULT, flush = getOption("hdf5r.flush_on_write"))

This function is for advanced users. It is recommended to useread instead or the[<- interfaceas used for arrays.This function implements the HDF5-API function H5Dwrite, with some changes to accommodate R.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for details.It writes that data from therobj into the dataset.

Parameters

robj

The object to write into the dataset

mem_space

The space as it is represented in memory; advanced feature; may be removed in the future

mem_type

Memory type; extracted from the dataset if null (can be passed in for efficiency reasons

file_space

An HDF5-space, represented as classH5S that determines which partof the dataset is being written.

dataset_xfer_pl

Dataset transfer property list. SeeH5P_DATASET_XFER

flush

Should a flush be done after the write

write(args, value, dataset_xfer_pl = h5const$H5P_DEFAULT, envir = parent.frame())

Main interface for writing data to the dataset. It is the function that is used by[<-, whereall indices are being passed in the parameterargs.

Parameters

args

The indices for each dimension to subset given as a list. This makes this easier to use as a programmatic API.For interactive use we recommend the use of the[ operator. If set toNULL, the entire dataset will be read.

value

The data to write to the dataset

envir

The environment in which to evaluateargs

dataset_xfer_pl

An object of classH5P_DATASET_XFER.

Return

The HDF5 dataset object, returned invisibly

set_extent(dims)

This function implements the HDF5-API function H5Dset_extent.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for details.

get_fill_value()

This function implements the HDF5-API function H5Pget_fill_value, automaticallysupplying the datatype of the dataset for convenience.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

create_reference(...)

This function implements the HDF5-API function H5Rcreate. The parameters are interpreted as in '['.The function always createH5R_DATASET_REGION referencesPlease see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_r.html for details.

print(..., max.attributes = 10)

Prints information for the dataset

Parameters

...

ignored

max.attributes

Maximum number of attribute names to print

obj_info(remove_internal_use_only = TRUE)

This function implements the HDF5-API function H5Oget_info.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.

get_obj_name()

This function implements the HDF5-API function H5Iget_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_i.html for details.

create_attr(attr_name, robj = NULL, dtype = NULL, space = NULL)

This function implements the HDF5-API function H5Acreate2.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_open(attr_name)

This function implements the HDF5-API function H5Aopen.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

create_attr_by_name(attr_name, obj_name, robj = NULL, dtype = NULL, space = NULL, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Acreate_by_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_open_by_name(attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Aopen_by_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_open_by_idx(n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Aopen_by_idx.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_exists_by_name(attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Aexists_by_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_exists(attr_name)

This function implements the HDF5-API function H5Aexists.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_rename_by_name(old_attr_name, new_attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Arename_by_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_rename(old_attr_name, new_attr_name)

This function implements the HDF5-API function H5Arename.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_delete(attr_name)

This function implements the HDF5-API function H5Adelete.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_delete_by_name(attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Adelete_by_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_delete_by_idx(n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Adelete_by_idx.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_info_by_name(attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Aget_info_by_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_info_by_idx(n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Aget_info_by_idx.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_name_by_idx(n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Aget_name_by_idx.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_get_number()

This function implements the HDF5-API function H5Aget_num_attrs.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

flush(scope = h5const$H5F_SCOPE_GLOBAL)

This function implements the HDF5-API function H5Fflush.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.

get_filename()

This function implements the HDF5-API function H5Fget_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.

dims()

Get the dimension of the dataset

maxdims()

Get the maximal dimension of the dataset

chunk_dims()

Return the dimension of the chunks. NA if the dataset is not chunked

key_info()

Returns the key types as a list, consisting of type, space, dataset_create_pl,type_size_raw, type_size_variable, dims and chunk_dims.type_size_raw versus variable differs for variable length types, which returnInffor type_size_variable and the underlying size for type_size_raw

Author(s)

Holger Hoefling

Examples

# First create a file to create datasets in itfname <- tempfile(fileext = ".h5")file <- H5File$new(fname, mode = "a")# Show the 3 different ways how to create a datasetfile[["directly"]] <- matrix(1:10, ncol=2)file$create_dataset("from_robj", matrix(1:10, ncol=2))dset <- file$create_dataset("basic", dtype=h5types$H5T_NATIVE_INT,             space=H5S$new("simple", dims=c(5, 2), maxdims=c(10,2)), chunk_dims=c(5,2))# Different ways of reading the datasetdset$read(args=list(1:5, 1))dset$read(args=list(1:5, quote(expr=)))dset$read(args=list(1:5, NULL))dset[1:5, 1]dset[1:5, ]dset[1:5, NULL]# Writing to the datasetdset$write(args=list(1:3, 1:2), value=11:16)dset[4:5, 1:2] <- -(1:4)dset[,]# Extract key informationdset$dimsdset$maxdimsdset$chunk_dimsdset$key_infodsetfile$close_all()file.remove(fname)

Class for interacting with HDF5 files.

Description

H5File objects are are the main entry point to access HDF5 data from binary files. This class represents an open HDF5 File-id. It inherits all functions of theH5RefClass.

Details

HDF5 files can be opened or generated using theH5File$new() function anda specified file access mode.H5File$new() returns aH5File objectwhich can be used to accessH5Groups and Datasets (seeH5D)using subsetting parameters or according class methods.

HDF5 files which have been created or opened throughH5File$new() need to be closed afterwards using$close_all().$close_all() not only closes the file itself,but also all objects that are still open inside it (such as groups or datasets).$flush() can be used to flush unwritten data to an HDF5 file.

HDF5 Files typically contain the following objects:

Groups

Similar to a file system folder, used to organize HDF5 objects in a hierarchical way, see alsoH5Group

Datasets

Objects to store actual data, see alsoH5D

Attributes

Meta data objects to store extra information about Files, Groups and Datasets, see alsoH5A

Value

Object of classH5File.

Methods

new(filename = NULL, mode = c("a", "r", "r+", "w", "w-", "x"), file_create_pl = h5const$H5P_DEFAULT, file_access_pl = h5const$H5P_DEFAULT, id = NULL)

Opens or creates a new HDF5 File

Parameters

filename

Name of the file

mode

How to open it.a creates a new file or opens an existing one for read/write.r opens anexisting file for reading,r+ opens an existing file for read/write.w creates a file, truncating anyexisting ones andw-/x are synonyms, creating a file and failing if it already exists.

get_obj_count(types = h5const$H5F_OBJ_ALL)

This function implements the HDF5-API function H5Fget_obj_count.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.

get_obj_ids(types = h5const$H5F_OBJ_ALL)

This function implements the HDF5-API function H5Fget_obj_ids.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.

get_filesize()

This function implements the HDF5-API function H5Fget_filesize.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.

file_info()

This function implements the HDF5-API function H5Fget_info2.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.Please note that the returned information differs if HDF5 Version 1.8.16 or HDF5 Version >= 1.10.0 is being used

get_intent()

This function implements the HDF5-API function H5Fget_intent.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.

close_all(close_self = TRUE)

Closes the file, flushes it and also closes all open objects that are still open in it. This is the recommended way ofclosing any file. If not all objects in a file are closed, the file remains open and cannot be re-opened the regular way.

print(..., max.attributes = 10, max.listing = 10)

Prints information for the file

Parameters

max.attributes

Maximum number of attribute names to print

max.listing

Maximum number of ls-items to print

...

ignored

open(name, link_access_pl = h5const$H5P_DEFAULT, dataset_access_pl = h5const$H5P_DEFAULT, type_access_pl = h5const$H5P_DEFAULT)

Opens groups, datasets or types using the appropriate HDF5-API functions. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for datasets,https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for types andhttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for general objects.

open_by_idx(n, group_name = ".", index_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Oopen_by_idx.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.

ls(recursive = FALSE, detailed = FALSE, index_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT, dataset_access_pl = h5const$H5P_DEFAULT, type_access_pl = h5const$H5P_DEFAULT)

Returns the contents of a file or group as a data.frame.

exists(name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Lexists.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

path_valid(path, check_object_valid = TRUE)

This function implements the HDF5-API function H5LTpath_valid.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l_t.html for details.

link(obj, new_link_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Olink.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.

obj_copy_to(dst_loc, dst_name, src_name, object_copy_pl = h5const$H5P_DEFAULT, link_create_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Ocopy.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.

obj_copy_from(src_loc, src_name, dst_name, object_copy_pl = h5const$H5P_DEFAULT, link_create_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Ocopy.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.

obj_info_by_idx(n, group_name = ".", index_field = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, remove_internal_use_only = TRUE)

This function implements the HDF5-API function H5Oget_info_by_idx.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.

obj_info_by_name(object_name, remove_internal_use_only = TRUE)

This function implements the HDF5-API function H5Oget_info_by_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.

group_info()

This function implements the HDF5-API function H5Gget_info.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_g.html for details.

group_info_by_name(name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Gget_info_by_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_g.html for details.

group_info_by_idx(n, group_name = ".", index_field = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Gget_info_by_idx.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_g.html for details.

create_group(name, link_create_pl = h5const$H5P_DEFAULT, group_create_pl = h5const$H5P_DEFAULT, group_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Gcreate2 and H5Gcreate_anon (if name is NULL). Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_g.html for regular groups andhttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_g.html for anonymous groups for details.

create_dataset(name, robj = NULL, dtype = NULL, space = NULL, dims = NULL, chunk_dims = "auto", gzip_level = 4, link_create_pl = h5const$H5P_DEFAULT, dataset_create_pl = h5const$H5P_DEFAULT, dataset_access_pl = h5const$H5P_DEFAULT)

This function is the main interface to create a new dataset. Its parameters allow for customization of the defaultbehavior, i.e. in order to get a specific datatype, a certain chunk size or dataset dimensionality.Also note that this function implements the HDF5-API function H5Dcreate2 and H5Dcreate_anon (if name is NULL). Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for regular groups andhttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for anonymous groups for details.

Parameters

name

The name of the new dataset. If missing, an anonymous dataset is created

robj

An R-object to take as a template for creating the dataset. Eitherrobj or bothdtype andspace have to be provided

dtype

The datatype to use for the creation of the object. Can be null ifrobj is given.

space

The space to use for the object creation. Can be null ifrobj is given. Otherwise an object of typeH5S which specifies the dimensions of the dataset.

dims

Dimension of the new dataset; used ifspace isNULL. overwrite the dimension guessed fromrobjifrobj is given.

chunk_dims

Size of the chunk. Has to have the same length as the dataset dimension. If"auto"then the size of each chunk is estimated so that each chunk is roughly as large in bytes as the value inthehdf5r.chunk_size option. See alsoguess_chunks for a more detailed explanation.If set toNULL, then no chunking is used, unless explicitly set indataset_create_pl.

gzip_level

Only ifchunk_dims is not null. If given, then thedataset_create_pl is set to enable zippingat the level given here. If set to NULL, then gzip is not set (but could be set otherwise indataset_create_pl

link_create_pl

Link creation property list. SeeH5P_LINK_CREATE

dataset_create_pl

Dataset creation property list. SeeH5P_DATASET_CREATE

dataset_access_pl

Dataset access property list. SeeH5P_DATASET_ACCESS

commit(name, dtype, link_create_pl = h5const$H5P_DEFAULT, type_create_pl = h5const$H5P_DEFAULT, type_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Tcommit2.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

link_create_hard(obj_loc, obj_name, link_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Lcreate_hard.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

link_create_soft(target_path, link_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Lcreate_soft.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

link_create_external(target_filename, target_obj_name, link_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Lcreate_external.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

link_exists(name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Lexists.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

link_move_from(src_loc, src_name, dst_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Lmove.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

link_move_to(dst_loc, dst_name, src_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Lmove.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

link_copy_from(src_loc, src_name, dst_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Lcopy.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

link_copy_to(dst_loc, dst_name, src_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Lcopy.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

link_delete(name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Ldelete.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

link_delete_by_idx(n, group_name = ".", index_field = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Ldelete_by_idx.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

link_info(name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Lget_info.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

link_info_by_idx(n, group_name = ".", index_field = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Lget_info_by_idx.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

link_value(name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Lget_val.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

link_value_by_idx(n, group_name = ".", index_field = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Lget_val_by_idx.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

link_name_by_idx(n, group_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Lget_name_by_idx.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

mount(name, child)

This function implements the HDF5-API function H5Fmount.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.

unmount(name)

This function implements the HDF5-API function H5Funmount.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.

create_reference(name = ".", space = NULL)

This function implements the HDF5-API function H5Rcreate. Ifspace=NULL then aH5R_OBJECT referenceis created, otherwise aH5R_DATASET_REGION referencePlease see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_r.html for details.

obj_info(remove_internal_use_only = TRUE)

This function implements the HDF5-API function H5Oget_info.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.

get_obj_name()

This function implements the HDF5-API function H5Iget_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_i.html for details.

create_attr(attr_name, robj = NULL, dtype = NULL, space = NULL)

This function implements the HDF5-API function H5Acreate2.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_open(attr_name)

This function implements the HDF5-API function H5Aopen.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

create_attr_by_name(attr_name, obj_name, robj = NULL, dtype = NULL, space = NULL, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Acreate_by_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_open_by_name(attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Aopen_by_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_open_by_idx(n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Aopen_by_idx.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_exists_by_name(attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Aexists_by_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_exists(attr_name)

This function implements the HDF5-API function H5Aexists.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_rename_by_name(old_attr_name, new_attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Arename_by_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_rename(old_attr_name, new_attr_name)

This function implements the HDF5-API function H5Arename.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_delete(attr_name)

This function implements the HDF5-API function H5Adelete.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_delete_by_name(attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Adelete_by_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_delete_by_idx(n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Adelete_by_idx.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_info_by_name(attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Aget_info_by_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_info_by_idx(n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Aget_info_by_idx.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_name_by_idx(n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Aget_name_by_idx.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_get_number()

This function implements the HDF5-API function H5Aget_num_attrs.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

flush(scope = h5const$H5F_SCOPE_GLOBAL)

This function implements the HDF5-API function H5Fflush.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.

get_filename()

This function implements the HDF5-API function H5Fget_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.

names(link_access_pl = h5const$H5P_DEFAULT)

Returns the names of the items in the group or at the root of the file

Parameters

link_access_pl

The link-access property list. Seehttps://support.hdfgroup.org/documentation/hdf5/latest/group___l_a_p_l.html for more detail.

Extract/List File Contents

The following functions are defined to extract HDF5 file contents:

list.groups

List HDF5 groups in file.

list.datasets

List HDF5 datasets in file.

names

List all items in a file or group (applicable forH5File andH5Group)

list.attributes

List Attributes of HDF5 object (file, group or dataset).

h5attr_names

Attribute names of an HDF5 object; similar to list.attributes

Author(s)

Holger Hoefling, Mario Annau

See Also

h5file

Examples

# The following examples generates a HDF5 file with the different HDF5 # Objects and shows its contents:fname <- tempfile(fileext = ".h5")file <- H5File$new(fname, mode = "a")file[["testdataset"]] <- 1:10h5attr(file, "testattrib") <- LETTERS[1:10]file$create_group("testgroup")file[["testgroup/testdataset2"]] <- 1:10# Show contents of filefile# Close file and deletefile$close_all()# The following example shows hdf5 file contents and how to use them to iterate over HDF5 elements:file <- h5file(fname, mode = "a")sapply(c("testgroup1", "testgroup2", "testgroup3"), file$create_group)file[["testgroup1/testset1"]] <- 1:10file[["testgroup2/testset2"]] <- 11:20file[["testgroup3/testset3"]] <- 21:30# Extract first 3 elements from each dataset and combine result to matrixsapply(list.datasets(file, recursive = TRUE), function(x) file[[x]][1:3])# Close filefile$close_all()file.remove(fname)

Open an HDF5 file

Description

Open an HDF5 file

Usage

H5File.open(name, mode = c("a", "r", "r+", "w", "w-", "x"),  file_create_pl = h5const$H5P_DEFAULT,  file_access_pl = h5const$H5P_DEFAULT)

Arguments

name

The name of the file to open

mode

The mode how to open the file

file_create_pl

File creation property list

file_access_pl

File access property list

Details

Open an HDF5 file.a creates a new file or opens an existing one for read/write.r opens anexisting file for reading,r+ opens an existing file for read/write.w creates a file, truncating anyexisting ones andw-/x are synonyms, creating a file and failing if it already exists.

Value

The file id (64bit-integer)

Author(s)

Holger Hoefling


Wrap an HDF5-id in the appropriate class

Description

Wrap an HDF5-id in the appropriate class

Usage

H5GTD_factory(id)

Arguments

id

The id to wrap in an R6 object

Details

This particular factory dispatches ids that can be of type Group, Datatype of dataset (these areid types that can be the result of opening an object. For datatypes, theH5T_factory exists that can be used

Value

An R6 object corresponding to the HDF5 internal class of the ID

Author(s)

Holger Hoefling


Class for representing HDF5 groups

Description

HDF5-Groups are essentially equivalent to directories in a file system. Inside the groups, other groups or datasets canbe created. For the most parts, groups behave like files, so please also look at the documentation ofH5File.

Value

Object of classH5Group.

Methods

print(..., max.attributes = 10, max.listing = 10)

Prints information for the group

Parameters

max.attributes

Maximum number of attribute names to print

max.listing

Maximum number of ls-items to print

...

ignored

open(name, link_access_pl = h5const$H5P_DEFAULT, dataset_access_pl = h5const$H5P_DEFAULT, type_access_pl = h5const$H5P_DEFAULT)

Opens groups, datasets or types using the appropriate HDF5-API functions. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for datasets,https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for types andhttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for general objects.

open_by_idx(n, group_name = ".", index_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Oopen_by_idx.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.

ls(recursive = FALSE, detailed = FALSE, index_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT, dataset_access_pl = h5const$H5P_DEFAULT, type_access_pl = h5const$H5P_DEFAULT)

Returns the contents of a file or group as a data.frame.

exists(name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Lexists.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

path_valid(path, check_object_valid = TRUE)

This function implements the HDF5-API function H5LTpath_valid.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l_t.html for details.

link(obj, new_link_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Olink.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.

obj_copy_to(dst_loc, dst_name, src_name, object_copy_pl = h5const$H5P_DEFAULT, link_create_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Ocopy.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.

obj_copy_from(src_loc, src_name, dst_name, object_copy_pl = h5const$H5P_DEFAULT, link_create_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Ocopy.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.

obj_info_by_idx(n, group_name = ".", index_field = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, remove_internal_use_only = TRUE)

This function implements the HDF5-API function H5Oget_info_by_idx.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.

obj_info_by_name(object_name, remove_internal_use_only = TRUE)

This function implements the HDF5-API function H5Oget_info_by_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.

group_info()

This function implements the HDF5-API function H5Gget_info.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_g.html for details.

group_info_by_name(name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Gget_info_by_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_g.html for details.

group_info_by_idx(n, group_name = ".", index_field = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Gget_info_by_idx.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_g.html for details.

create_group(name, link_create_pl = h5const$H5P_DEFAULT, group_create_pl = h5const$H5P_DEFAULT, group_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Gcreate2 and H5Gcreate_anon (if name is NULL). Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_g.html for regular groups andhttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_g.html for anonymous groups for details.

create_dataset(name, robj = NULL, dtype = NULL, space = NULL, dims = NULL, chunk_dims = "auto", gzip_level = 4, link_create_pl = h5const$H5P_DEFAULT, dataset_create_pl = h5const$H5P_DEFAULT, dataset_access_pl = h5const$H5P_DEFAULT)

This function is the main interface to create a new dataset. Its parameters allow for customization of the defaultbehavior, i.e. in order to get a specific datatype, a certain chunk size or dataset dimensionality.Also note that this function implements the HDF5-API function H5Dcreate2 and H5Dcreate_anon (if name is NULL). Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for regular groups andhttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for anonymous groups for details.

Parameters

name

The name of the new dataset. If missing, an anonymous dataset is created

robj

An R-object to take as a template for creating the dataset. Eitherrobj or bothdtype andspace have to be provided

dtype

The datatype to use for the creation of the object. Can be null ifrobj is given.

space

The space to use for the object creation. Can be null ifrobj is given. Otherwise an object of typeH5S which specifies the dimensions of the dataset.

dims

Dimension of the new dataset; used ifspace isNULL. overwrite the dimension guessed fromrobjifrobj is given.

chunk_dims

Size of the chunk. Has to have the same length as the dataset dimension. If"auto"then the size of each chunk is estimated so that each chunk is roughly as large in bytes as the value inthehdf5r.chunk_size option. See alsoguess_chunks for a more detailed explanation.If set toNULL, then no chunking is used, unless explicitly set indataset_create_pl.

gzip_level

Only ifchunk_dims is not null. If given, then thedataset_create_pl is set to enable zippingat the level given here. If set to NULL, then gzip is not set (but could be set otherwise indataset_create_pl

link_create_pl

Link creation property list. SeeH5P_LINK_CREATE

dataset_create_pl

Dataset creation property list. SeeH5P_DATASET_CREATE

dataset_access_pl

Dataset access property list. SeeH5P_DATASET_ACCESS

commit(name, dtype, link_create_pl = h5const$H5P_DEFAULT, type_create_pl = h5const$H5P_DEFAULT, type_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Tcommit2.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

link_create_hard(obj_loc, obj_name, link_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Lcreate_hard.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

link_create_soft(target_path, link_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Lcreate_soft.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

link_create_external(target_filename, target_obj_name, link_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Lcreate_external.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

link_exists(name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Lexists.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

link_move_from(src_loc, src_name, dst_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Lmove.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

link_move_to(dst_loc, dst_name, src_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Lmove.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

link_copy_from(src_loc, src_name, dst_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Lcopy.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

link_copy_to(dst_loc, dst_name, src_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Lcopy.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

link_delete(name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Ldelete.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

link_delete_by_idx(n, group_name = ".", index_field = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Ldelete_by_idx.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

link_info(name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Lget_info.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

link_info_by_idx(n, group_name = ".", index_field = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Lget_info_by_idx.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

link_value(name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Lget_val.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

link_value_by_idx(n, group_name = ".", index_field = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Lget_val_by_idx.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

link_name_by_idx(n, group_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Lget_name_by_idx.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.

mount(name, child)

This function implements the HDF5-API function H5Fmount.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.

unmount(name)

This function implements the HDF5-API function H5Funmount.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.

create_reference(name = ".", space = NULL)

This function implements the HDF5-API function H5Rcreate. Ifspace=NULL then aH5R_OBJECT referenceis created, otherwise aH5R_DATASET_REGION referencePlease see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_r.html for details.

obj_info(remove_internal_use_only = TRUE)

This function implements the HDF5-API function H5Oget_info.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.

get_obj_name()

This function implements the HDF5-API function H5Iget_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_i.html for details.

create_attr(attr_name, robj = NULL, dtype = NULL, space = NULL)

This function implements the HDF5-API function H5Acreate2.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_open(attr_name)

This function implements the HDF5-API function H5Aopen.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

create_attr_by_name(attr_name, obj_name, robj = NULL, dtype = NULL, space = NULL, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Acreate_by_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_open_by_name(attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Aopen_by_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_open_by_idx(n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Aopen_by_idx.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_exists_by_name(attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Aexists_by_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_exists(attr_name)

This function implements the HDF5-API function H5Aexists.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_rename_by_name(old_attr_name, new_attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Arename_by_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_rename(old_attr_name, new_attr_name)

This function implements the HDF5-API function H5Arename.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_delete(attr_name)

This function implements the HDF5-API function H5Adelete.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_delete_by_name(attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Adelete_by_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_delete_by_idx(n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Adelete_by_idx.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_info_by_name(attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Aget_info_by_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_info_by_idx(n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Aget_info_by_idx.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_name_by_idx(n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Aget_name_by_idx.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_get_number()

This function implements the HDF5-API function H5Aget_num_attrs.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

flush(scope = h5const$H5F_SCOPE_GLOBAL)

This function implements the HDF5-API function H5Fflush.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.

get_filename()

This function implements the HDF5-API function H5Fget_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.

names(link_access_pl = h5const$H5P_DEFAULT)

Returns the names of the items in the group or at the root of the file

Parameters

link_access_pl

The link-access property list. Seehttps://support.hdfgroup.org/documentation/hdf5/latest/group___l_a_p_l.html for more detail.

Author(s)

Holger Hoefling

Examples

fname <- tempfile(fileext = ".h5")file <- H5File$new(fname, mode = "a")group <- file$create_group("testgroup")group$print()group$close()file$close_all()

Retrieve object from a group of file

Description

Retrieve object from a group of file

Usage

## S3 method for class 'H5Group'x[[name, ..., link_access_pl = h5const$H5P_DEFAULT,  dataset_access_pl = h5const$H5P_DEFAULT,  type_access_pl = h5const$H5P_DEFAULT]]## S3 method for class 'H5File'x[[name, ..., link_access_pl = h5const$H5P_DEFAULT,  dataset_access_pl = h5const$H5P_DEFAULT,  type_access_pl = h5const$H5P_DEFAULT]]## S3 replacement method for class 'H5Group'x[[name, ...]] <- value## S3 replacement method for class 'H5File'x[[name, ...]] <- value

Arguments

x

An object of classH5File orH5Group

name

Name of the object to retrieve. Has to be a character vector of length one. No integer values allowed.

...

Currently ignored

link_access_pl

An object of classH5P_LINK_ACCESS.

dataset_access_pl

An object of classH5P_DATASET_ACCESS.

type_access_pl

Currently alwaysh5const$H5P_DEFAULT

value

What to assign. Has to be one ofH5Group,H5D orH5T

Details

Works similar to retrieving objects in a list.x[["my_name"]] retrieves objectmy_name from theHDF5-File or HDF5-Groupx.

One can also assign objects under a not yet existing name. For either aH5Group orH5D,a hard link is created. If it is a datatype,H5T, this is committed under the chosen namename.

Value

AH5Group,H5D orH5T, depending on the object saved in the group underthe requested name.

Author(s)

Holger Hoefling


Class for HDF5 property lists.

Description

This is the base class for all property lists, but most have a specialized class.It inherits all functions of theH5RefClass. It is also the base class for many other classes, specifically

Dataset Creation

H5P_DATASET_CREATE

Dataset Access

H5P_DATASET_ACCESS

Dataset Transfer

H5P_DATASET_XFER

Link Creation

H5P_LINK_CREATE

Link Access

H5P_LINK_ACCESS

Object Creation

H5P_OBJECT_CREATE

Object Copy

H5P_OBJECT_COPY

Attribute Creation

H5P_ATTRIBUTE_CREATE

The base class is unlikely to be needed by users - they should use the appropriate subclass required.

Value

Object of classH5P.

Methods

new(id = NULL)

Create a new property list; this function itself is unlikely to be needed by users. Users shoulduse the classes of the type they actually require

Parameters

id

Internal use only

get_class()

This function implements the HDF5-API function H5Pget_class.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

get_class_name()

This function implements the HDF5-API function H5Pget_class_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

copy()

This function implements the HDF5-API function H5Pcopy.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

equal(cmp)

This function implements the HDF5-API function H5Pequal.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

Author(s)

Holger Hoefling

Examples

fname <- tempfile(fileext = ".h5")file <- H5File$new(fname, mode = "a")file[["testdataset"]] <- 1:10p <- file[["testdataset"]]$get_create_plist()p$get_class()p$get_class_name()p$copy()p$equal(p)file$close_all()

Class for HDF5 property list for attribute creation

Description

It inherits all functions of theH5P.

Value

Object of classH5P_ATTRIBUTE_CREATE.

Methods

new(id = NULL)

Create a new class of typeH5P_ATTRIBUTE_CREATE

Parameters

id

Internal use only

set_char_encoding(encoding = h5const$H5T_CSET_UTF8)

This function implements the HDF5-API function H5Pset_char_encoding. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

get_char_encoding()

This function implements the HDF5-API function H5Pget_char_encoding. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

Author(s)

Holger Hoefling

See Also

H5P


Class for HDF5 property list classes (not HDF5 property lists)

Description

It inherits all functions of theH5RefClass. The intent of this class is toprovide a mechanism to compare the class of HDF5 property classes. This is mainly intended for internal useto get the class type of an HDF5 identifier that is known to be a property list, but not of which type.

Value

Object of classH5P_CLASS.

Methods

equal(cmp)

This function implements the HDF5-API function H5Pequal.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

Author(s)

Holger Hoefling

See Also

H5P


Class for HDF5 property list for dataset access

Description

It inherits all functions of theH5P.

Value

Object of classH5P_DATASET_ACCESS.

Methods

set_chunk_cache(rdcc_nslots = -1, rdcc_nbytes = -1, rdcc_w0 = -1)

This function implements the HDF5-API function H5Pset_chunk_cache.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

get_chunk_cache()

This function implements the HDF5-API function H5Pget_chunk_cache.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

Author(s)

Holger Hoefling

See Also

H5P


Class for HDF5 property list for dataset creation

Description

It inherits all functions of theH5P.

Value

Object of classH5P_DATASET_CREATE.

Methods

new(id = NULL)

Create a new class of typeH5P_DATASET_CREATE

Parameters

id

Internal use only

set_layout(layout = h5const$H5D_CHUNKED)

This function implements the HDF5-API function H5Pset_layout.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

get_layout()

This function implements the HDF5-API function H5Pget_layout.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

set_chunk(chunk)

This function implements the HDF5-API function H5Pset_chunk.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

get_chunk(max_ndims)

This function implements the HDF5-API function H5Pget_chunk.If the layout is not chunked, returns NA.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

set_deflate(level)

This function implements the HDF5-API function H5Pset_deflate.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

set_fill_value(dtype, value)

This function implements the HDF5-API function H5Pset_fill_value.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

get_fill_value(dtype)

This function implements the HDF5-API function H5Pget_fill_value.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

set_fill_time(fill_time = h5const$H5D_FILL_TIME_IFSET)

This function implements the HDF5-API function H5Pset_fill_time.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

get_fill_time()

This function implements the HDF5-API function H5Pget_fill_time.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

set_alloc_time(alloc_time = h5const$H5D_ALLOC_TIME_DEFAULT)

This function implements the HDF5-API function H5Pset_alloc_time.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

get_alloc_time()

This function implements the HDF5-API function H5Pget_alloc_time.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

set_filter(filter = h5const$H5Z_FILTER_DEFLATE, flags = h5const$H5Z_FLAG_OPTIONAL, cd_values = integer(0))

This function implements the HDF5-API function H5Pset_filter.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

all_filters_avail()

This function implements the HDF5-API function H5Pall_filters_avail.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

get_nfilters()

This function implements the HDF5-API function H5Pget_nfilters.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

get_filter(idx)

This function implements the HDF5-API function H5Pget_filter2.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

modify_filter(filter = h5const$H5Z_FILTER_DEFLATE, flags = h5const$H5Z_FLAG_OPTIONAL, cd_values = integer(0))

This function implements the HDF5-API function H5Pmodify_filter.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

remove_filter(filter = h5const$H5Z_FILTER_ALL)

This function implements the HDF5-API function H5Premove_filter.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

set_fletcher32()

This function implements the HDF5-API function H5Pset_fletcher32.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

set_nbit()

This function implements the HDF5-API function H5Pset_nbit.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

set_scaleoffset(scale_type = h5const$H5Z_SO_FLOAT_DSCALE, scale_factor = 0)

This function implements the HDF5-API function H5Pset_scaleoffset.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

set_shuffle()

This function implements the HDF5-API function H5Pset_shuffle.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

set_szip()

This function implements the HDF5-API function H5Pset_szip.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

set_external(filename, offset, size)

This function implements the HDF5-API function H5Pset_external.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

get_external_count()

This function implements the HDF5-API function H5Pget_external_count.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

get_external(idx)

This function implements the HDF5-API function H5Pget_external.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

Author(s)

Holger Hoefling

See Also

H5P


Class for HDF5 property list for dataset transfer

Description

It inherits all functions of theH5P.

Value

Object of classH5P_DATASET_XFER.

Methods

new(id = NULL)

Create a new class of typeH5P_DATASET_XFER

Parameters

id

Internal use only

set_buffer(size = 2^20)

This function implements the HDF5-API function H5Pset_buffer.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

set_edc_check(check = h5const$H5Z_ENABLE_EDC)

This function implements the HDF5-API function H5Pset_edc_check.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

get_edc_check()

This function implements the HDF5-API function H5Pget_edc_check.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

set_hyper_vector_size(size = 2^10)

This function implements the HDF5-API function H5Pset_hyper_vector_size.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

get_hyper_vector_size()

This function implements the HDF5-API function H5Pget_hyper_vector_size.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

set_btree_ratios(left, middle, right)

This function implements the HDF5-API function H5Pset_btree_ratios.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

get_btree_ratios()

This function implements the HDF5-API function H5Pget_btree_ratios.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

Author(s)

Holger Hoefling

See Also

H5P


Class for default values for HDF5 property lists.

Description

This class represents default values for H5P property lists. As withH5S_ALL, the current choice is not optimalfor the same reasons and likely to be changed

Value

Object of classH5P.

Methods

print(...)

Just prints that it is the default class

Parameters

...

ignored

Author(s)

Holger Hoefling


Class for HDF5 property list for file creation

Description

It inherits all functions of theH5P.

Value

Object of classH5P_FILE_ACCESS.

Methods

new(id = NULL)

Create a new class of typeH5P_FILE_ACCESS

Parameters

id

Internal use only

set_cache(rdcc_nslots = 521, rdcc_nbytes = 2^20, rdcc_w0 = 0.75)

This function implements the HDF5-API function H5Pset_cache.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

get_cache()

This function implements the HDF5-API function H5Pget_cache.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

Author(s)

Holger Hoefling

See Also

H5P


Class for HDF5 property list for file creation

Description

It inherits all functions of theH5P.

Value

Object of classH5P_FILE_CREATE.

Methods

new(id = NULL)

Create a new class of typeH5P_FILE_CREATE

Parameters

id

Internal use only

set_userblock(size)

This function implements the HDF5-API function H5Pset_userblock.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

get_userblock()

This function implements the HDF5-API function H5Pget_userblock.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

set_sizes(sizeof_addr, sizeof_size)

This function implements the HDF5-API function H5Pset_sizes.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

get_sizes()

This function implements the HDF5-API function H5Pget_sizes.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

set_sym_k(ik, lk)

This function implements the HDF5-API function H5Pset_sym_k.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

get_sym_k()

This function implements the HDF5-API function H5Pget_sym_k.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

set_istore_k(ik)

This function implements the HDF5-API function H5Pset_istore_k.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

get_istore_k()

This function implements the HDF5-API function H5Pget_istore_k.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

set_file_space(strategy, threshold)

This function implements the HDF5-API function H5Pset_file_space.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

get_file_space()

This function implements the HDF5-API function H5Pget_file_space.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

Author(s)

Holger Hoefling

See Also

H5P


Description

It inherits all functions of theH5P.

Value

Object of classH5P_LINK_ACCESS.

Methods

new(id = NULL)

Create a new class of typeH5P_LINK_ACCESS

Parameters

id

Internal use only

set_nlinks(nlinks)

This function implements the HDF5-API function H5Pset_nlinks.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

get_nlinks()

This function implements the HDF5-API function H5Pget_nlinks.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

set_elink_prefix(elink_prefix)

This function implements the HDF5-API function H5Pset_elink_prefix.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

get_elink_prefix()

This function implements the HDF5-API function H5Pget_elink_prefix.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

set_elink_acc_flags(elink_acc_flags = h5const$H5F_ACC_RDWR)

This function implements the HDF5-API function H5Pset_elink_acc_flags.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

get_elink_acc_flags()

This function implements the HDF5-API function H5Pget_elink_acc_flags.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

Author(s)

Holger Hoefling

See Also

H5P


Description

It inherits all functions of theH5P.

Value

Object of classH5P_LINK_CREATE.

Methods

new(id = NULL)

Create a new class of typeH5P_LINK_CREATE

Parameters

id

Internal use only

set_char_encoding(encoding = h5const$H5T_CSET_UTF8)

This function implements the HDF5-API function H5Pset_char_encoding.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

get_char_encoding()

This function implements the HDF5-API function H5Pget_char_encoding.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

set_create_intermediate_group(create = TRUE)

This function implements the HDF5-API function H5Pset_create_intermediate_group.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

get_create_intermediate_group()

This function implements the HDF5-API function H5Pget_create_intermediate_group.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

Author(s)

Holger Hoefling

See Also

H5P


Class for HDF5 property list for object copying

Description

It inherits all functions of theH5P.

Value

Object of classH5P_OBJECT_COPY.

Methods

new(id = NULL)

Create a new class of typeH5P_OBJECT_COPY

Parameters

id

Internal use only

set_copy_obj(copy_options = 0)

This function implements the HDF5-API function H5Pset_copy_object. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

get_copy_obj()

This function implements the HDF5-API function H5Pget_copy_object. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

Author(s)

Holger Hoefling

See Also

H5P


Class for HDF5 property list for object creation

Description

It inherits all functions of theH5P.

Value

Object of classH5P_OBJECT_CREATE.

Methods

new(id = NULL)

Create a new class of typeH5P_OBJECT_CREATE

Parameters

id

Internal use only

set_obj_track_times(track_times = TRUE)

This function implements the HDF5-API function H5Pset_obj_track_times. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

get_obj_track_times()

This function implements the HDF5-API function H5Pget_obj_track_times. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

set_attr_phase_change(max_compact, min_dense)

This function implements the HDF5-API function H5Pset_attr_phase_change. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

get_attr_phase_change()

This function implements the HDF5-API function H5Pget_attr_phase_change. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

set_attr_creation_order(crt_order_flags = 0)

This function implements the HDF5-API function H5Pset_attr_creation_order. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

get_attr_creation_order()

This function implements the HDF5-API function H5Pget_attr_creation_order. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.

Author(s)

Holger Hoefling

See Also

H5P


Create anH5P out of an id

Description

Create anH5P out of an id

Usage

H5P_factory(id)

Arguments

id

The id to wrap inside an object

Details

Function that determines the property list type of an id and createsthe appropriate class for it.

Value

An object of classH5P

Author(s)

Holger Hoefling


Class for HDF5 Reference datatypes.

Description

H5R is only the common base class and is never used. User should not create objects of thisclass by themselves and instead use thecreate_reference methods ofH5D,H5Group orH5File classes.Sub-classes areH5R_OBJECT andH5R_DATASET_REGION

Value

Object of classH5R.

Methods

subset_read(dim_index, drop = TRUE)

Method that returns a subset of the data in the H5R-object

Parameters

dim_index

A list of dimension indices as usually pasted into[

drop

Logical. Should dimensions of size 1 be dropped.

subset2_read(i, exact = TRUE)

Method to read a single item

Parameters

i

The single item to read

exact

Is the item name exact or should partial matching be allowed?

subset_assign(dim_index, value)

Assign values into a subset of the H5R-vector

Parameters

dim_index

A list of dimension indices as usually passed into[

value

The value to assign

subset2_assign(i, exact = TRUE, value)

Assign a value to a single value in the array

Parameters

i

the index where to assign the value

value

The value to assign

t()

Transpose the object if it is a matrix (i.e. has rank 2

length()

Get the length of the object

ref(ref)

Get or assign the internal raw-vector representation of the data. Usually, user's shouldn't have to use this.

dim(x)

Get or assign the dimensionality of the object

dimnames(x)

Get or assign the dimnames of the object

names(x)

Get or assign the names of the object

rank()

Get the rank of the object

Author(s)

Holger Hoefling

Examples

fname <- tempfile(fileext = ".h5")file <- H5File$new(fname, mode = "a")file[["testset"]] <- matrix(rnorm(9), nrow = 3)dset <- file[["testset"]]r <- file$create_reference("testset")file$close_all()

Class for HDF5 dataset-region references.

Description

H5R_DATASET_REGION is the reference class for dataset regions. Users should not create this class by themselves, but use the appropriate and instead use thecreate_reference methods ofH5D,H5Group orH5File classes.

Value

Object of classH5R_DATASET_REGION.

Methods

new(num = 0, id = NULL)

Create a new reference for dataset regions; Usually, users shouldn't have to call this, but use thecreate_reference method of a dataset.

dereference(object_access_pl = h5const$H5P_DEFAULT, obj = NULL, get_value = FALSE)

Dereference an H5R reference for a dataset region. The file the reference is pointing to is assigned automatically.It returns a list where each item is a list with componentsdataset, being anH5D object andspace being aH5S object. When settingget_value=TRUE, then instead of these objectsThe data itself is returnedThis function implements the HDF5-API function H5Rdereference.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_r.html for details.

Parameters

obj

Overriding the default file the reference is referring to

object_access_pl

The object-access property list. Currently always the default

Author(s)

Holger Hoefling


Class for HDF5 Object-references.

Description

H5R_OBJECT is the reference class for objects. Users should not create this class by themselves, but use the appropriate and instead use thecreate_reference methods ofH5D,H5Group orH5File classes.

Value

Object of classH5R_OBJECT.

Methods

new(num = 0, id = NULL)

Create a new reference for object; Usually, users shouldn't have to call this, but use thecreate_referencemethod of a dataset, group of committed datatype

dereference(object_access_pl = h5const$H5P_DEFAULT, obj = NULL)

Dereference an H5R reference. The file the reference is pointing to is assigned automaticallyThis function implements the HDF5-API function H5Rdereference.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_r.html for details.

Parameters

obj

Overriding the default file the reference is referring to

object_access_pl

The object-access property list. Currently always the default

Author(s)

Holger Hoefling


Various functions forH5R objects

Description

Various functions forH5R objects

Usage

is.H5R(x)is.H5R_OBJECT(x)is.H5R_DATASET_REGION(x)## S3 method for class 'H5R'names(x)## S3 method for class 'H5R'length(x)## S3 method for class 'H5R'x[i, j, ..., drop = TRUE]## S3 replacement method for class 'H5R'x[i, ...] <- value## S3 method for class 'H5R'c(..., recursive = FALSE)## S3 method for class 'H5R'dim(x)## S3 replacement method for class 'H5R'dim(x) <- value## S3 method for class 'H5R't(x)## S3 method for class 'H5R'dimnames(x)## S3 replacement method for class 'H5R'dimnames(x) <- value## S3 method for class 'H5R'cbind(..., deparse.level = 1)## S3 method for class 'H5R'rbind(..., deparse.level = 1)## S3 method for class 'H5R'print(x, ...)## S3 method for class 'H5R'format(x, ...)## S3 method for class 'H5R'as.data.frame(x, row.names = NULL, optional = FALSE, ...,  nm = paste(deparse(substitute(x), width.cutoff = 500L), collapse =  " "))## S3 method for class 'H5R'as.vector(x, mode = "any")

Arguments

x

Object of typeH5R

i

First dimension

j

Second dimension

...

Any other dimensions (for subsetting), or objects to concatenate (forc)or combine by row/col (forcbind orrbind) or ignored (forprint andformat)

drop

Should dimensions of size 1 be dropped; LOGICAL

value

The value in an assignment

recursive

Ignored here

deparse.level

integer controlling the construction of labels in the case of non-matrix-like arguments (for the default method):'deparse.level = 0' constructs no labels; the default, 'deparse.level = 1' constructs labels from the argumentnames

row.names

NULL or a character vector giving the row names for thedata frame. Missing values are not allowed.

optional

logical. IfTRUE, setting row names and converting columnnames (to syntactic names: seemake.names) is optional.

nm

The column names to use

mode

Only 'any' supported

width.cutoff

ignored

collapse

ignored

Details

is.H5R

Check if object inherits fromH5R

is.H5R_OBJECT

Check if object inherits fromH5R_OBJECT

is.H5R_DATASET_REGION

Check if object inherits fromH5R_DATASET_REGION

names.H5R

Returns the names of the elements of the vector

length.H5R

Returns the length of the vector

[.H5R

Array subsetting function

[<-.H5R

Array subset assignment

c.H5R

Concatenation ofH5R vectors

dim.H5R

Dimensionality of the object

dim<-.H5R

Assign dimension of the object

t.H5R

Transpose a matrix ofH5R objects

dimnames.H5R

Get the dimnames of the object

dimnames<-.H5R

Set the dimnames of the object

cbind.H5R

cbind functionality forH5R objects

rbind.H5R

rbind functionality forH5R objects

print.H5R

Printing of an object of classh5R

format.H5R

Formatting of an H5R object

as.data.frame.H5R

Coerce anH5R object to a data.frame

as.vector.H5R

Coerce to a vector

as.data.frame.H5R

Coerces the object to a data.frame

as.vector.H5R

Coerces to a vector

Value

Depending on the function

Author(s)

Holger Hoefling


Base class that tracks the ids and allows for closing an id

Description

This class is not intended for creating objects, but as a base class for all otherH5-derived classes to provide common functionality for id tracking

Value

Object of reference classH5RefClass.

Fields

id

Returns the id of the object as an integer

Methods

new(id = NULL)

Constructor for the basic class for hdf5 objects. Takes an id and stores it appropriately, includingthe necessary counting of object references that the package implements. This reference counting isincluded in addition to R's internal method in order to allow for the invalidation of objectsin R itself when all open handles in an R-file are being closed.

close()

Closes an object and calls the appropriate HDF5 function for the type of object

print(...)

Prints the class of the object and the id

methods()

Prints available methods on the screen

get_file_id()

This function implements the HDF5-API function H5Iget_file_id.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_i.html for details.

get_obj_type()

This function implements the HDF5-API function H5Iget_type.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_i.html for details.

get_ref()

This function implements the HDF5-API function H5Iget_ref.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_i.html for details.

inc_ref()

This function implements the HDF5-API function H5Iinc_ref.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_i.html for details.

dec_ref()

This function implements the HDF5-API function H5Idec_ref.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_i.html for details.

id()

Returns the id of the object

is_valid()

This function implements the HDF5-API function H5Iis_valid.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_i.html for details.Additionally, the R-object representing the HDF5-id can be invalidated as well. In thiscase, the class id is set toNA andis_valid returnsFALSE.

message()

Legacy function; currently not used; may be removed

Author(s)

Holger Hoefling


Class for representing HDF5 spaces

Description

This class representsSpaces in HDF5. These are mostly useful to define thedimensions of a dataset as well as the maximum dimensions to which it can grow. By default, themaximum dimension is equal to the initial dimension. If you want the array to be able to grow arbitrarilylarge in one dimension, set the maximum dimension for this index toInf. See the examples belowfor code how to do this.

Value

Object of classH5S.

Methods

new(type = c("simple", "scalar", "null"), dims = NULL, maxdims = dims, decode_buf = NULL, id = NULL)

Create a new HDF5-space. This can be done by either specifying a space with appropriate dimensions or bydecoding a character string that represents an encoded space

Parameters

type

Either asimple space, for whichdims andmaxdims have to be givenor ascalar ornull space. See the HDF5 user guide on spaces to explain the differences.

dims

The dimension of the space in case it is of typesimple

maxdims

The maximal dimensions of the space

decode_buf

The character string that holds the encoded representation of a space

id

An existing HDF5 id; internal use only

copy()

This function implements the HDF5-API function H5Scopy. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.

encode()

This function implements the HDF5-API function H5Sencode. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.

is_simple()

This function implements the HDF5-API function H5Sis_simple. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.

get_simple_extent_ndims()

This function implements the HDF5-API function H5Sget_simple_extent_ndims. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.

offset_simple(offset)

This function implements the HDF5-API function H5Soffset_simple. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.

get_simple_extent_dims()

This function implements the HDF5-API function H5Sget_simple_extent_dims. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.

get_simple_extent_npoints()

This function implements the HDF5-API function H5Sget_simple_extent_npoints. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.

get_simple_extent_type()

This function implements the HDF5-API function H5Sget_simple_extent_type. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.

extent_copy(h5s_source)

This function implements the HDF5-API function H5Sextent_copy. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.

extent_equal(h5s_cmp)

This function implements the HDF5-API function H5Sextent_equal. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.

set_extent_simple(dims, maxdims)

This function implements the HDF5-API function H5Sset_extent_simple. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.

set_extent_none()

This function implements the HDF5-API function H5Sset_extent_none. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.

get_select_type()

This function implements the HDF5-API function H5Sget_select_type. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.

get_select_npoints()

This function implements the HDF5-API function H5Sget_select_npoints. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.

get_select_hyper_nblocks()

This function implements the HDF5-API function H5Sget_select_hyper_nblocks. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.

get_select_hyper_blocklist(startblock = 0, numblocks = (self$get_select_hyper_nblocks() - startblock))

This function implements the HDF5-API function H5Sget_select_hyper_blocklist. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.

get_select_elem_npoints()

This function implements the HDF5-API function H5Sget_select_elem_npoints. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.

get_select_elem_pointlist(startpoint = 0, numpoints = (self$get_select_elem_npoints() - startpoint))

This function implements the HDF5-API function H5Sget_select_elem_pointlist. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.

get_select_bounds()

This function implements the HDF5-API function H5Sget_select_bounds. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.

select_all()

This function implements the HDF5-API function H5Sselect_all. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.

select_none()

This function implements the HDF5-API function H5Sselect_none. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.

select_valid()

This function implements the HDF5-API function H5Sselect_valid. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.

select_elements(coord, op = h5const$H5S_SELECT_SET, byrow = TRUE)

This function implements the HDF5-API function H5Sselect_elements. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.

select_hyperslab(start, count, stride = NULL, block = NULL, op = h5const$H5S_SELECT_SET)

This function implements the HDF5-API function H5Sselect_hyperslab. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.

subset(args, op = h5const$H5S_SELECT_SET, envir = parent.frame())

Subsetting the space. This is mainly intended as a helper function for the '[' function, butcan also be used on its own.

Parameters

args

The indices for each dimension to subset given as a list. This makes this easier to use as a programmatic API.For interactive use we recommend the use of the[ operator.

op

The operator to use. Same as for the other HDF5 space selection functions. One of the elements shown inh5const$H5S_seloper_t

envir

The environment in which to evaluateargs

print(...)

Prints information for the group

Parameters

...

ignored

dims()

Get the dimensions of the space. Return NULL if the space is not simple (i.e. NULL-space) or a length-0 integer if it is a scalar

maxdims()

Get the maximal dimensions of the space.Return NULL if the space is not simple (i.e. NULL-space) or a length-0 integer if it is a scalar

rank()

This function implements the HDF5-API function H5Sget_simple_extent_ndims. Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.

Author(s)

Holger Hoefling

Examples

h5s_fixed <- H5S$new("simple", dims=c(5, 2))h5s_fixedh5s_variable <- H5S$new("simple", dims=c(5,2), maxdims=c(Inf,2))h5s_variableh5s_variable$set_extent_simple(c(10,2), c(Inf, 2))h5s_variable# now select a subset of points# argument evaluation has a heuristic; here it chooses point selectionh5s_variable[c(1, 3, 8), 1]h5s_variable$get_select_type()h5s_variable$get_select_elem_pointlist()# and a hyperslab (chosen by the argument heuristic)h5s_variable[2:7, 1:2]h5s_variable$get_select_type()h5s_variable$get_select_hyper_blocklist()

Class for HDF5 default space

Description

It inherits all functions of theH5S. As this is implemented, closing the id is overridden as this is a special id.

Value

Object of classH5S_ALL.

Methods

print(...)

Just prints that it is the default class

Parameters

...

ignored

Author(s)

Holger Hoefling

See Also

H5S


Selecting and assigning subsets of HDF5-Spaces and HDF5-Datasets

Description

Selecting and assigning subsets of HDF5-Spaces and HDF5-Datasets

Usage

subset_h5.H5S(x, d1, ..., op = h5const$H5S_SELECT_SET,  envir = parent.frame())## S3 method for class 'H5S'x[d1, ..., op = h5const$H5S_SELECT_SET,  envir = parent.frame()]subset_h5.H5D(x, d1, ..., dataset_xfer_pl = h5const$H5P_DEFAULT,  flags = getOption("hdf5r.h5tor_default"), drop = TRUE,  envir = parent.frame())## S3 method for class 'H5D'x[d1, ..., dataset_xfer_pl = h5const$H5P_DEFAULT,  flags = getOption("hdf5r.h5tor_default"), drop = TRUE,  envir = parent.frame()]subset_assign_h5.H5D(x, d1, ..., dataset_xfer_pl = h5const$H5P_DEFAULT,  envir = parent.frame(), value)## S3 replacement method for class 'H5D'x[d1, ..., dataset_xfer_pl = h5const$H5P_DEFAULT,  envir = parent.frame()] <- value

Arguments

x

TheH5S orH5D to subset or assign values to

d1

First dimension of the object

...

Used for other dimension of the object

op

Operation to perform on theH5S. Look into the HDF5 online helphttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html andhttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html

envir

The environment in which the dimension indicesd1, ... are to be evaluated. Usually the environment fromwhere the function is called

dataset_xfer_pl

An object of classH5P_DATASET_XFER.

flags

Some flags governing edge cases of conversion from HDF5 to R. This is related to how integers are being treated andthe issue of R not being able to natively represent 64bit integers and not at all being able to represent unsigned 64bit integers(even using add-on packages). The constants governing this are part ofh5const. The relevant ones start with the termH5TOR and are documented there. The default set here returns a regular 32bit integer if it doesn't lead to an overflowand returns a 64bit integer from thebit64 package otherwise. For 64bit unsigned int that are larger than 64bit signed int,it return adouble. This looses precision, however. See also documentation orh5const.

drop

Logical. When reading data, should dimensions of size 1 be dropped.

value

The value to assign to the dataset

Details

Used for subsetting HDF5-Datasets or HDF5-Spaces or for assigning data into HDF5-Datasets. There are some differences toconsider with R itself.

Most importantly HDF5-COMPOUND objects only have a single dimension internally to HDF5 (a vector), but they correspond to R-data.frames,which are 2 dimensional. For an HDF5 COMPOUND object, it is currently not possible to only sub-select a specific column.All columns have to be extracted (using 1-dimensional access with[ and can then be subset in R itself.The same is true for writing a COMPOUND object (H5T_COMPOUND). A complete data-frameis needed, not just a subset of the columns.

Another important differences is for datasets of HDF5-ARRAY typeH5T_ARRAYwhere the access to the object is only for the dimension of the object itself, not including the dimensions of the underlying array type.

Value

Forx being aH5S, the same object is returned, but with the selection set as requested. ForH5D it retrieves the subset of data requested or sets the subset of data assigned, as for any n-dimensional arrayin R.

Author(s)

Holger Hoefling


Class for HDF5 datatypes.

Description

This is the base class for all datatypes, but most have a specialised class.This class represents an HDF5 datatype. It inherits all functions of theH5RefClass. It is also the base class for many other classes well, specifically

Integer

H5T_INTEGER

Bitfield

H5T_BITFIELD (currently identical to the integer class)

Float

H5T_FLOAT

Enum

H5T_ENUM

Compound

H5T_COMPOUND

String

H5T_STRING

Complex

H5T_COMPLEX

Array

H5T_ARRAY

Variable Length

H5T_VLEN

Value

Object of classH5T.

Methods

new(id)

Internal use only

get_class()

This function implements the HDF5-API function H5Tget_class.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

get_size(...)

This function implements the HDF5-API function H5Tget_size.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

Parameters

...

ignored

set_size(size)

This function implements the HDF5-API function H5Tset_size.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

set_precision(precision)

This function implements the HDF5-API function H5Tset_precision.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

get_precision()

This function implements the HDF5-API function H5Tget_precision.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

set_order(order)

This function implements the HDF5-API function H5Tset_order.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

get_order()

This function implements the HDF5-API function H5Tget_order.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

set_offset(offset)

This function implements the HDF5-API function H5Tset_offset.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

get_offset()

This function implements the HDF5-API function H5Tget_offset.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

set_pad(pad)

This function implements the HDF5-API function H5Tset_pad.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

get_pad()

This function implements the HDF5-API function H5Tget_pad.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

copy()

This function implements the HDF5-API function H5Tcopy.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

is_committed()

This function implements the HDF5-API function H5Tcommitted.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

equal(dtype)

This function implements the HDF5-API function H5Tequal.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

is_vlen()

This function detects if the underlying type is H5T_VLEN or a variable length string. This is used to know ifafter reading a dataset, memory has to be freed

detect_class(dtype_class)

This function implements the HDF5-API function H5Tdetect_class.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

get_native_type(direction = h5const$H5T_DIR_ASCEND)

This function implements the HDF5-API function H5Tget_native_type.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

get_create_plist()

This function implements the HDF5-API function H5Tget_create_plist.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

to_text(lang_type = h5const$H5LT_DDL)

This function implements the HDF5-API function H5LTdtype_to_text.

print(...)

Prints information for the group

Parameters

...

ignored

obj_info(remove_internal_use_only = TRUE)

This function implements the HDF5-API function H5Oget_info.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.

get_obj_name()

This function implements the HDF5-API function H5Iget_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_i.html for details.

create_attr(attr_name, robj = NULL, dtype = NULL, space = NULL)

This function implements the HDF5-API function H5Acreate2.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_open(attr_name)

This function implements the HDF5-API function H5Aopen.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

create_attr_by_name(attr_name, obj_name, robj = NULL, dtype = NULL, space = NULL, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Acreate_by_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_open_by_name(attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Aopen_by_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_open_by_idx(n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Aopen_by_idx.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_exists_by_name(attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Aexists_by_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_exists(attr_name)

This function implements the HDF5-API function H5Aexists.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_rename_by_name(old_attr_name, new_attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Arename_by_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_rename(old_attr_name, new_attr_name)

This function implements the HDF5-API function H5Arename.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_delete(attr_name)

This function implements the HDF5-API function H5Adelete.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_delete_by_name(attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Adelete_by_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_delete_by_idx(n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Adelete_by_idx.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_info_by_name(attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Aget_info_by_name.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_info_by_idx(n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Aget_info_by_idx.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_name_by_idx(n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT)

This function implements the HDF5-API function H5Aget_name_by_idx.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

attr_get_number()

This function implements the HDF5-API function H5Aget_num_attrs.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.

create_reference(name = ".", space = NULL)

This function implements the HDF5-API function H5Rcreate. Ifspace=NULL then aH5R_OBJECT referenceis created, otherwise aH5R_DATASET_REGION referencePlease see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_r.html for details.

Author(s)

Holger Hoefling

Examples

my_int <- h5types$H5T_NATIVE_INTmy_int$to_text()my_int$get_size()# Show how to commit a datatypefname <- tempfile(fileext = ".h5")file <- H5File$new(fname, mode = "a")my_int$is_committed()file$commit("my_int", my_int)my_int$is_committed()# can now also add attributesh5attr(my_int, "test") <- "A string"h5attributes(my_int)file$close_all()file.remove(fname)

Class for HDF5 array datatypes.

Description

Inherits from classH5T. This class represents an array. As datasets in HDF5are itself already arrays, this datatype is not needed there. It is mostly useful when a column in aH5T_COMPUND object is intended to be an array. This however makes it difficult to workwith such objects in R - as a column of the correspondingdata.frame has to be an array. So pleaseuse with care.

Value

Object of classH5T_ARRAY.

Methods

new(dims, dtype_base, id = NULL)

Create an array datatype.

Parameters

dims

The dimension of the datatype

dtype_base

The datatype that makes up the elements of the array

id

internal use only

get_array_ndims()

This function implements the HDF5-API function H5Tget_array_ndims.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

get_array_dims()

This function implements the HDF5-API function H5Tget_array_dims2.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

get_super()

This function implements the HDF5-API function H5Tget_super.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

describe()

Print a detailed description of the datatype; this is experimental

Author(s)

Holger Hoefling

See Also

H5T


Class for HDF5 complex datatypes

Description

In HDF5, complex numbers don't actually exist. They are represented as H5T_COMPOUND with two columns namedReal andImaginary.Inherits from classH5T_COMPOUND.

Value

Object of classH5T_COMPLEX.

Methods

new(id = NULL)

Create a new complex datatype

Parameters

id

Internal use only

Author(s)

Holger Hoefling

See Also

H5T,H5T_COMPOUND


Class for HDF5 compound datatypes.

Description

Inherits from classH5T.

Value

Object of classH5T_COMPOUND.

Methods

new(labels, dtypes, size = NULL, offset = NULL, id = NULL)

Create at compound type that is the HDF5 equivalent of a table

Parameters

labels

The labels of the columns of the compound object

dtypes

The datatypes of the columns of the object; this is usually a list of objectsof classH5T

size

The size of each datatype; ifNULL, automatically inferred

offset

The offset where each datatype starts; can be different from the sum of the individual sizesso that datatypes are aligned with memory addresses. IfNULL, inferred automatically

id

Internal use only

pack()

This function implements the HDF5-API function H5Tpack.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

get_cpd_types()

ReturnH5T objects that represent the datatypes of the columns of the compound object. Returned as a list if more than 1

get_cpd_labels()

Return the labels of the columns as a character vector

get_cpd_classes()

Return the classes of the columns as an object of typefactor_ext

get_cpd_offsets()

Return the offsets of the datatypes

describe()

Print a detailed description of the datatype; this is experimental

Author(s)

Holger Hoefling

See Also

H5T

Examples

# create a H5T_COMPOUND  corresponding to a data-framemy_cpd <- H5T_COMPOUND$new(c("name", "age", "salary"),    dtypes=list(H5T_STRING$new(size=200), h5types$H5T_NATIVE_INT, h5types$H5T_NATIVE_DOUBLE))my_cpd

Class for HDF5 enumeration datatypes.

Description

Inherits from classH5T.

Value

Object of classH5T_ENUM.

Methods

new(labels, values = seq_along(labels), id = NULL)

Create an enumeration datatype. This is either a factor-like object or a logical variable (that isinternally represented as an ENUM-type.

Parameters

labels

The labels of the ENUM-type

values

The values corresponding to the labels

id

Internal use only

get_labels()

Return all the labels of the enumeration type

get_values()

Return the values of the enumeration type

set_size(size)

Base type of every enum isH5T_INTEGER. This disables the set_size function

get_super()

ReturnsH5T_INTEGER that is the base type of the enumeration

describe()

Print a detailed description of the datatype; this is experimental

Author(s)

Holger Hoefling

See Also

H5T

Examples

nucleotide_enum <- H5T_ENUM$new(labels=c("A", "C", "G", "T"), values=0:3)nucleotide_enum# For HDF5 1.8.16 or higher, the size and precision are set optimallynucleotide_enum$get_size()nucleotide_enum$get_precision()

Class for HDF5 floating point datatypes.

Description

Inherits from classH5T. Users should not create float types with this class, but insteaduse e.g.h5types$H5T_NATIVE_DOUBLE. Using the functions of this class, many aspects of the representation of thefloating point number can then be manipulated.

Value

Object of classH5T_FLOAT.

Methods

set_fields(spos, epos, esize, mpos, msize)

This function implements the HDF5-API function H5Tset_fields.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

get_fields()

This function implements the HDF5-API function H5Tget_fields.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

set_ebias(ebias)

This function implements the HDF5-API function H5Tset_ebias.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

get_ebias()

This function implements the HDF5-API function H5Tget_ebias.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

set_norm(norm)

This function implements the HDF5-API function H5Tset_norm.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

get_norm()

This function implements the HDF5-API function H5Tget_norm.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

set_inpad(inpad)

This function implements the HDF5-API function H5Tset_inpad.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

get_inpad()

This function implements the HDF5-API function H5Tget_inpad.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

describe()

Print a detailed description of the datatype; this is experimental

Author(s)

Holger Hoefling

See Also

H5T


Class for HDF5 integer-datatypes.

Description

Inherits from classH5T.Users should not create integer datatypes themselves using this class. Instead, integer should be derivedfrom one of the base-types such ash5types$H5T_NATIVE_INT (which internally automatically creates a copy of the type).For a complete list of types seeh5types$overview.

Value

Object of classH5T_INTEGER.

Methods

set_sign(sign)

This function implements the HDF5-API function H5Tset_sign.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

get_sign()

This function implements the HDF5-API function H5Tget_sign.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

describe()

Return a vector that describes the key features of the datatype

Author(s)

Holger Hoefling

See Also

H5T

Examples

my_int <- h5types$H5T_NATIVE_INT# make an int with 2 bitmy_int$set_sign(h5const$H5T_SGN_NONE)my_int$set_size(1)my_int$set_precision(2)my_int$describe()

Class for HDF5 logical datatypes. This is an enum with the 3 values FALSE, TRUE and NA mapped on values 0, 1 and 2.Is transparently mapped onto a logical variable

Description

Inherits from classH5T.

Value

Object of classH5T_LOGICAL.

Methods

new(include_NA = TRUE, id = NULL)

Create a logical datatype. This isinternally represented by an ENUM-type

Parameters

id

Internal use only

Author(s)

Holger Hoefling

See Also

H5T,H5T_ENUM


Class for HDF5 string datatypes.

Description

Inherits from classH5T.

Value

Object of classH5T_STRING.

Methods

new(type = c("c", "fortran"), size = 1, id = NULL)

Create a string datatype

Parameters

A

C or fortran type string

size

Size of the string object. Set toInf for variable size strings

id

internal use only

get_size(variable_as_inf = TRUE)

Retrieves the length of the string, setting it toInf it is of variable length.This function implements the HDF5-API function H5Tis_variable_str.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

get_cset()

This function implements the HDF5-API function H5Tget_cset.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

set_cset(cset = c("unknown", "UTF-8"))

This function implements the HDF5-API function H5Tset_cset.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

set_strpad(strpad)

This function implements the HDF5-API function H5Tset_strpad.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

get_strpad()

This function implements the HDF5-API function H5Tget_strpad.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

describe()

Print a detailed description of the datatype; this is experimental

Author(s)

Holger Hoefling

See Also

H5T

Examples

# fixed width stringstr_flen <- H5T_STRING$new(size=100)str_flen$is_vlen()str_flen# variable length stringstr_vlen <- H5T_STRING$new(size=Inf)str_vlen$is_vlen()str_vlen

Class for HDF5 variable-length datatypes.

Description

Inherits from classH5T. This can make any datatype a variable length datatype.This would mostly be intended for storing ragged arrays.

Value

Object of classH5T_VLEN.

Methods

new(dtype_base, id = NULL)

Create a variable length datatype

Parameters

dtype_base

The basis-type of the variable length datatype

id

Internal use only

get_super()

This function implements the HDF5-API function H5Tget_super.Please see the documentation athttps://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.

describe()

Print a detailed description of the datatype; this is experimental

Author(s)

Holger Hoefling

See Also

H5T

Examples

vlen_int <- H5T_VLEN$new(h5types$H5T_NATIVE_INT)vlen_int

Extract HDF5-ids and return as a vector

Description

Extract HDF5-ids and return as a vector

Usage

H5T_extractID(dtype_ids)

Arguments

dtype_ids

Ids itself or class objects to extract the ids from.

Details

Internal helper function. Given a list of id-type-objects, it extracts theids itself and returns them as a vector

Value

The ids as a integer64-vector

Author(s)

Holger Hoefling


Turn ids intoH5T objects

Description

Turn ids intoH5T objects

Usage

H5T_factory(ids, do_copy = FALSE)

Arguments

ids

The ids to return as objects

do_copy

Should the ids be copied using HDF5s internal copy mechanism

Details

Gets the HDF5 internal class for an id and dispatches them so that the correctR6es are being created.

Value

An object of type R6 classH5T

Author(s)

Holger Hoefling


Closes any HDF5 id using the appropriate library function

Description

Closes any HDF5 id using the appropriate library function

Usage

H5_close_any(id)

Arguments

id

The id to closes

Details

Internal function to help with management of open ids. It is used to closean id that is no longer needed using the appropriate HDF5 library function.

Value

NULL, invisibly

Author(s)

Holger Hoefling


Low-level conversion functions from R to HDF5 and vice versa

Description

Low-level conversion functions from R to HDF5 and vice versa

Usage

RToH5(Robj, dtype, nelem)H5ToR_Pre(dtype, nelem)H5ToR_Post(Robj, dtype, nelem, flags = getOption("hdf5r.h5tor_default"),  id = -1)

Arguments

Robj

The R-object to transfer to HDF5

dtype

Datatype of the HDF5 object. Of classH5T

nelem

Number of elements to copy

flags

Some flags governing edge cases of conversion from HDF5 to R. This is related to how integers are being treated andthe issue of R not being able to natively represent 64bit integers and not at all being able to represent unsigned 64bit integers(even using add-on packages). The constants governing this are part ofh5const. The relevant ones start with the termH5TOR and are documented there. The default set here returns a regular 32bit integer if it doesn't lead to an overflowand returns a 64bit integer from thebit64 package otherwise. For 64bit unsigned int that are larger than 64bit signed int,it is truncated (the default; but can also be set to NA).

id

When creating a reference, an id for the file (or an object in the file) is needed. By default-1, which will workwith everything except references.

Details

These are the low-level function that dispatch the R object to HDF5 object conversion to the underlying C code.None of these should be accessed by the end-user under normal circumstances. See alsoconvertRoundTripfor an example of how to use them.

Value

The converted object or the buffer into which the object is written.

Author(s)

Holger Hoefling


Apply a selection to a space

Description

Apply a selection to a space

Usage

apply_selection(space_id, selection)

Arguments

space_id

The space_id of the space to which to apply the selection to

selection

The selection object of classpoint_selection orhyperslab_selection

Details

Calls the respective stand-alone functions for point-selection or multiple hyperslab selection. The reason for notcalling a method of an R6 object is to make it more efficient and make it useable without creating a full R6 object.

Author(s)

Holger Hoefling


Can arguments be interpreted as a scalar?

Description

Can arguments be interpreted as a scalar?

Usage

are_args_scalar(args)

Arguments

args

The arguments to check

Details

Check if there is only one argument and if it is either emptyof of length 1 with value 1, i.e. can be interpreted as a scalar.

Value

Logical if the arguments can be interpreted as a scalar

Author(s)

Holger Hoefling


Evaluate if the arguments are regular for hyperslab use

Description

Evaluate if the arguments are regular for hyperslab use

Usage

args_regularity_evaluation(args, ds_dims, envir, post_read = TRUE)

Arguments

args

The arguments input; if it was empty, then set to NULL

ds_dims

The dimensions of the input dataset

envir

The environment in which to evaluate the arguments

post_read

Should the reshuffle be computed for post-read (thenTRUE) or pre-write (thenFALSE)

Details

For each argument check if it can be used as a hyperslab, potentially after sorting and making unique.

Value

A list with 2 parts; Evaluated arguments, regularity report and reshuffle indicators. Will be returned as a listwith componentsargs_in,args_point,is_hyperslab,hyperslab,needs_reshuffle,reshuffle,result_dims_pre_shuffle,result_dims_post_shuffle,max_dims

Author(s)

Holger Hoefling


Cycle through n-dimensional array indices

Description

Cycle through n-dimensional array indices

Usage

array_counter(count, dims)

Arguments

count

The counter (0-based)

dims

The sizes of the dimension

Details

Cycles through all indices of an n-dimensional array. The first dimensionmoves fastest. The counter is 0-based and the output is 0-based as well.

Value

An integer vector of the same length asdim, with 0-based indices

Author(s)

Holger Hoefling


Reorder an array

Description

Reorder an array

Usage

array_reorder(x, dims, reorder_dim, new_order, item_size)

Arguments

x

The array; doesn't have to have a dim attribute; is just assumed to be a vector

dims

The dimensionality of the array

reorder_dim

The dimension to reorder

new_order

The new ordering of the reorder_dim; not checked for correctness; 1-based

item_size

The size in bytes of each array item; not discovered automatically

Details

Reorders an array using a fast underlying c-function. It is implementedfor its simple generality and only intended for internal use in the package.

Value

The re-ordered array

Author(s)

Holger Hoefling


Convert a double or integer to hex

Description

Convert a double or integer to hex

Usage

as_hex(x)

Arguments

x

The integer or double vector to convert

Details

Converts a double or integer to hex. Contrary to the built-informat,this is done without any conversion of integers in double-format to integers in integer format.

Value

Character string with the hex value

Author(s)

Holger Hoefling


Check argument for known functions that encode a hyperslab

Description

Check argument for known functions that encode a hyperslab

Usage

check_arg_for_hyperslab_func(x, envir)

Arguments

x

The argument to check

envir

The environment in which to evaluate the argument

Details

Checks for the functions:,seq andseq_len

Value

A vector of length 4 describing start, count, stride and block if appropriate

Author(s)

Holger Hoefling


Cleaning result of internalR_H5ls function

Description

Cleaning result of internal_H5ls function

Usage

clean_ls_df(df)

Arguments

df

The result of the C-functionR_H5ls

Details

For every*_success item that isFALSE, the corresponding row of the data.frame will be set to NA.

Value

A data frame with content that was not successfully gathered set toNA and*_success columns removed

Author(s)

Holger Hoefling


Round-trip of converting data to HDF5 and back to R

Description

Round-trip of converting data to HDF5 and back to R

Usage

convertRoundTrip(Robj, dtype, nelem = length(Robj),  flags = h5const$H5TOR_CONV_INT64_NOLOSS)

Arguments

Robj

The object to convert

dtype

The datatype to convert it into

nelem

The number of elements in the object

flags

conversion flags from HDF5 to R

Details

Take an R-object, convert it to HDF5, convert it back and return input, output and intermediate stepsThis is mainly intended for use in tests.

Value

A list with input, number of elements, raw vector for intermediate storage and output

Author(s)

Holger Hoefling


Create an empty R-object according to a given HDF5 datatype

Description

Create an empty R-object according to a given HDF5 datatype

Usage

create_empty(nelem, dtype)

Arguments

nelem

The number of elements to use for the object

dtype

The datatype based on which an empty R-object should be created

Details

With complex datatypes it can be useful to have a template that can be used so that thedata input into a dataset conforms to expectations.

Given a datatype, this function creates an object of lengthnelem.Here, an empty datatype refers to objects with value 0 for numeric objects andempty strings.

Value

An empty R object corresponding to the datatype that was passed in

Author(s)

Holger Hoefling


Reshuffle the input as needed - seeargs_regularity_evaluation

Description

Reshuffle the input as needed - seeargs_regularity_evaluation

Usage

do_reshuffle(x, reg_eval_res)

Arguments

x

The array to reshuffle

reg_eval_res

The result of the regularity evaluation

Details

When necessary, this function performs the reshuffle as defined byargs_regularity_evaluation.

Value

The reshuffled input

Author(s)

Holger Hoefling


Compare the ids of objects

Description

Compare the ids of objects

Usage

equal_id_check(...)

Arguments

...

AnyH5RefClass objects

Details

When severalH5RefClass objects are passed in

Value

Logical - are all ids the same of the objects passed in

Author(s)

Holger Hoefling


Expand list of points for each dimension into a matrix of all combinations

Description

Expand list of points for each dimension into a matrix of all combinations

Usage

expand_point_grid(point_list)

Arguments

point_list

A list of the points in each dimension to include

Details

The function is similar to theexpand.grid function

Value

A matrix with every combination of points for each dimension

Author(s)

Holger Hoefling


Extract the dimension of a space and datatype

Description

Get the correct dimensions for a space and datatype

Usage

extract_dim(space, dtype)

Arguments

space

The space with the selection that was used to read the dataset

dtype

The datatype of the dataset

Details

This function uses the space and the selection in it to get the correct dimensionfor the resulting object (but without dropping dimensions). Furthermore, if thedatatype is an array, those dimensions are correctly determined as well.

Internal use only; currently unused

Value

x, but with a new dimension attribute

Author(s)

Holger Hoefling


Create an extended factor

Description

Create an extended factor

Usage

factor_ext(x, values, levels, drop = FALSE)

Arguments

x

The object to convert to anfactor_ext

values

The values used for the levels; This is werefactor_ext is different from afactor, as values for levels do not have to be consecutive or start at 1.

levels

The levels of the object; character string

drop

Should non-occurring levels be dropped

Details

An extended version of a regularfactor variable. Instead of the levels having values from1 to n where n is the number of levels, any integer value can be used for any level (including 64bit integers). Ifall values are in the range of a regular 32-bit integer, it is coerced to int. Automatic coercion of extended factorsto factors inH5ToR_Post for enums only works for 32-bit integer base types.In this page this is heavily used, as constants in HDF5 can be arbitrary integer values.

Value

An object of S3 classfactor_ext

Author(s)

Holger Hoefling


Various functions forfactor_ext objects

Description

Various functions forfactor_ext objects

Usage

values(x, ...)## S3 method for class 'factor_ext'values(x, ...)## S3 method for class 'factor'values(x, ...)## Default S3 method:values(x, ...)## S3 method for class 'factor_ext'as.character(x, ...)## S3 method for class 'factor_ext'x[[...]]## S3 replacement method for class 'factor_ext'x[[...]] <- value## S3 method for class 'factor_ext'x[..., drop = FALSE]## S3 replacement method for class 'factor_ext'x[...] <- valueis.factor_ext(x)coercible_to_factor(x)coerce_to_factor(x)## S3 method for class 'factor_ext'print(x, quote = FALSE, max.levels = NULL,  width = getOption("width"), ...)## S3 method for class 'factor_ext'e1 == e2## S3 method for class 'factor_ext'e1 != e2## S3 method for class 'factor_ext'c(...)

Arguments

x

Object of typefactor_ext

...

Currently ignored

value

The object to assign; here has be a level offactor_ext

drop

Should dimensions of size 1 be dropped?

quote

logical, indicating whether or not strings should be printed with surrounding quotes.

max.levels

integer, indicating how many levels should be printed. if '0', no extra "Levels" line will be printed. Thedefault, 'NULL', entails choosing 'max.levels' such that the levels print on one line of width 'width' (same for values).

width

only used whenmax.levels is NULL (see above)

e1,e2

The two objects in the equality or inequality comparison.

Details

values

Extracts the underlying values of an object (the generic here)

values.factor_ext

Extracts the underlying values of afactor_ext object

values.factor

Extracts the underlying values of afactor

values.default

Default of the values function; currently returns an error

as.character

Coercesfactor_ext to a character-representation using it levels, not values

[[.factor_ext

Single-item subsetting of afactor_ext object

[[<-.factor_ext

Single-item subset assignment to afactor_ext object

[.factor_ext

Subsetting of afactor_ext object

[<-.factor_ext

Subset assignment to afactor_ext object

is.factor_ext

Check if it is afactor_ext object. Returns a logical

coercible_to_factor

Checks if afactor_ext could be coerced to afactor. Return a logical.

coerce_to_factor

Coerces to afactor, otherwise throws an error if not possible.

print.factor_ext

Prints afactor_ext object.

==.factor_ext

Compare twofactor_ext for equality.

!=.factor_ext

Compare twofactor_ext for inequality.

c.factor_ext

Concatenate objects of typefactor_ext.

Value

Depending on the function

Author(s)

Holger Hoefling


Flatten a nested data.frame

Description

Flatten a nested data.frame

Usage

flatten_df(df, factor_ext_to_char = FALSE)

Arguments

df

The data.frame to flatten

factor_ext_to_char

Should extended factor variables be converted to characters (mainly for easy printing)

Details

HDF5 Compounds allow for nesting. Correspondingly, nested data.frames are being produced.This function flattens such a nested data.frame.

For easier printing to the screen, it also allows for coercion offactor_ext tocharacter variables.

Value

A flatteneddata.frame

Author(s)

Holger Hoefling


Get the id of an H5RefClass

Description

Get the id of an H5RefClass

Usage

get_id(obj)

Arguments

obj

Object to get the id from

Details

If it is a H5RefClass, returns the id, otherwise returns theobject itself as it assumes it is already an id.

Value

The id itself

Author(s)

Holger Hoefling


Guess the dimension of a chunk

Description

Guess the dimension of a chunk

Usage

guess_chunks(space_maxdims, dtype_size,  chunk_size = getOption("hdf5r.chunk_size"))

Arguments

space_maxdims

Maximal dimensions of the dataset

dtype_size

Size of the datatype that is stored

chunk_size

Size of each chunk in bytes

Details

The size of the chunk in bytes is first divided by the size of the datatype, giving the number of elementsto be stored in each chunk. This is taken as a rough guideline. Then, the number of dimensions of the dataset is used.By default, the chunk is assumed to have the same size in each dimension, yielding an initial guess.

If the resulting chunk is larger than the entire dataset for a maximal dimension, this dimension of the chunk is reduced andredistributed to the other dimensions.

As a chunk is never allowed to be larger than the maximum dimension of the dataset itself,

Value

An integer vector giving the dimension of the chunk

Author(s)

Holger Hoefling


Guess the HDF5 datatype of an R object

Description

Guess the HDF5 datatype of an R object

Usage

guess_nelem(x, dtype)guess_dim(x)guess_dtype(x, ds_dim = NULL, scalar = FALSE,  string_len = getOption("hdf5r.default_string_len"))

Arguments

x

The object for which to guess the HDF5 datatype or the dimension or the number of elements

dtype

datatype; used in guessing the number of dataset elements of an r object

ds_dim

Can explicitly set the dimension of the dataset object. Forscalar, this is one. Otherwise, this can beused so that a multi-dimensional object can be represented so that some of its dimension are in the dataset, and some are inside anH5T_ARRAY

scalar

Should the datatype be created so thatx can be represented as a scalar with that datatype? This is intendedto know if a vector/array should be represented as anH5T_ARRAY or not.

string_len

If a string is in the R object, the length to which the corresponding HDF5 type should be set. If it is apositive integer, the string is of that length. If it isInf, it is variable length. If it is set toestimate,it is set to the length of the longest string in thex.

Details

Given an object, it creates a datatype in HDF5 that would match this object. For simple datasets like arrays, thisfunction is not so useful, but is very good for creating dataframes or hierarchical objects (like lists of dataframes) etc.

Value

An object of classH5T that represents the HDF5-type of the Robj that was passed in

Author(s)

Holger Hoefling


Guess the dataspace of an object

Description

Guess the dataspace of an object

Usage

guess_space(x, dtype, chunked = TRUE)

Arguments

x

The R object for which to guess the space

dtype

Object of typeH5T, that represents that datatype to use.

chunked

Is the datatype chunked? If yes,maxdims of the space will be set to infinity,otherwisemaxdims will be set to the original extent of the space.

Details

Creates a dataspace that fits an R object so that it can be written into a dataset. This is usedfor example in dataset creation based on an R-object, not a specifically defined dimensions.

Value

An object of typeH5S

Author(s)

Holger Hoefling


Wrapper functions to provide anh5 compatible interface.

Description

The functions listed below provide a wrapper-interface compatible to functions specified in theh5 package. The author(s)have decided to deprecateh5 and join forces and still make the transition forh5 users as smooth as possible.Additionally, almost all testcases could be transferred tohdf5r to improve test coverage even more.

Usage

h5file(...)createGroup(object, name, ...)openLocation(object, name)openGroup(object, name)createDataSet(object, name, ...)readDataSet(object)h5close(object)h5flush(object)existsGroup(object, name)is.h5file(name)extendDataSet(object, dims)## S3 method for class 'H5D'rbind(x, mat, ..., deparse.level = 1)## S3 method for class 'H5D'cbind(x, mat, ..., deparse.level = 1)## S3 method for class 'H5D'c(x, ...)h5unlink(object, name)list.attributes(object)

Arguments

...

Additional parameters passed tocreate_group orh5file.

object

CommonFG; Object implementing the CommonFG Interface (e.g.H5File,H5Group).

name

Name of the group to create.

dims

numeric; Dimension vector to which dataset should be extended.

x

An object of class H5D; the dataset to add rows or columns to; Needs to be a matrix

mat

The matrix to add to x

deparse.level

Set to 1; ignored otherwise; only present as required by generic

Details

Below you can find a list of allh5 functions includinghdf5rmappings.

h5file

Directly maps toH5File$new, see alsoH5File.

createGroup

Maps toobject$create_group where object implementsCommonFG.

openLocation

Usesobject$open where object implementsCommonFG.

createDataSet

Maps toobject$create_dataset where object implementsCommonFG.

readDataSet

Maps toobject$read, see alsoH5D.

h5close

Maps toobject$close_all forH5File andobject$close for other.

h5flush

Maps toobject$flush where object implementsCommonFGDTA.

The followinginterfaces are defined:

CommonFG

Implemented by objects of classH5File andH5Group.

CommonFGDTA

Implemented by objects of classH5File,H5Group,H5D,H5T andH5A.

References

Mario Annau (2017).h5: Interface to the 'HDF5' Library. R package version 0.9.9.https://github.com/mannau/h5


Interface for HDF5 attributes

Description

Interface for HDF5 attributes

Usage

h5attributes(x)h5attr_names(x)h5attr(x, which)h5attr(x, which) <- value

Arguments

x

The object to which to attach the attribute to or retrieve it from. Can be one ofH5Group,H5D,H5T orH5File

which

The name of the attribute to assign it to

value

The value to assign to the attribute.

Details

Implements high-level functions that allows interactions with HDF5-attributes in a way very similar to regular R-object attributesin R are handled.

Value

Forh5attributes, a named list with the content of the attributes read out. Forh5attr_names,a vector of names of the attributes attached to the objectx. Forh5attr, the content of the attribute andforh5attr<-, the assignment, the original object to which the attributes are attached (so that chaining is possible).

Author(s)

Holger Hoefling


All constants used in HDF5

Description

These are all constants used in HDF5. They are stored in an environment with locked bindings so thatthey cannot be changed. An overview of all constants can be seen withh5const$overview, listing all of them.Each constant can be accessed using$ and the name of the constant. See the examples below.

Details

There are also some flags that govern edge cases of conversion from HDF5 to R. This is related to how integers are being treated andthe issue of R not being able to natively represent 64bit integers and not at all being able to represent unsigned 64bit integers(even using add-on packages).The constants all start with the termH5TOR. There are currently possible values

H5TOR_CONV_NONE

Doesn't do any conversion. Every integer datatype with more than 32 bit is returned as 64bit integers. Forunsigned 64bit integers, the conversion to signed 64bit integers is done by truncation

H5TOR_CONV_INT64_INT_NOLOSS

Under this setting, whenever a 64 bit integer would be returned, it is checked if it would alsofit into a 32 bit integer without data loss and returned as such if possible

H5TOR_CONV_INT64_FLOAT_NOLOSS

Under this setting, whenever a 64 bit integer would be returned, it is checked if it would alsofit into a 64 bit floating point value without data loss and returned as such if possible

H5TOR_CONV_INT64_NOLOSS

CombinesH5TOR_CONV_INT64_INT_NOLOSS andH5TOR_CONV_INT64_FLOAT_NOLOSS and is setas the default in thehdf5r.h5tor_default option.

H5TOR_CONV_INT64_FLOAT_FORCE

Under this setting, whenever a 64 bit integer would be returned, it is coerced to a doubleeven if this results in a loss of precision. If a loss of precision occurs, a warning is issued. Please note that this also overridesthe use ofH5TOR_CONV_UNIT64_NA. As loss of precision is already accepted, UINT64-values that are larger than LLONG_MAX will be representedas their next possible floating point value.

H5TOR_CONV_UINT64_NA

When converting an unsigned 64bit integer, any values that don't fit into a signed 64bit integer areset to NA. If this flag is not set, then the values will be truncated toLLONG_MAX, the largest 64bit signed integer.

H5TOR_CONV_DEFAULT

Is bothH5TOR_CONV_INT64_INT andH5TOR_CONV_UNIT64_FLOAT

Author(s)

Holger Hoefling

Examples

h5const$overviewh5const$H5F_ACC_RDWRh5const$H5F_ACC_DEFAULT# Combining flagsbitwOr(h5const$H5TOR_CONV_UINT64_NA, h5const$H5TOR_CONV_INT64_INT_NOLOSS)

Trigger the HDF5 garbage collection

Description

Trigger the HDF5 garbage collection

Usage

h5garbage_collect()

Details

This function triggers the HDF5 internal garbage collection. It is independent of theR garbage collection and currently has to be triggered by hand.

Value

InvisibleNULL

Author(s)

Holger Hoefling


These are all types that are used in HDF5

Description

HDF5 provides many native datatypes. These are all stored in theh5typesenvironment. An overview of all available types can be seen usingh5types$overview.Any specific type can be accessed using the$-operator. See also the examples below.

Author(s)

Holger Hoefling

Examples

h5types$overviewh5types$H5T_NATIVE_INTh5types$H5T_NATIVE_DOUBLE

Return the version of the HDF5-API

Description

Return the version of the HDF5-API

Usage

h5version(verbose = TRUE)

Arguments

verbose

Should the information be printed to the screen as well

Details

Return the version of the HDF5-API and print it to the screen if requested

Value

Version of the underlying HDF5 API as a string

Author(s)

Holger Hoefling


Single hyperslab dimension to explicit vector

Description

Single hyperslab dimension to explicit vector

Usage

hyperslab_to_points(hyperslab)

Arguments

hyperslab

a length 4 vector describing the start, count, stride and block component of a single dimension of a hyperslab

Details

Uses the information of a hyperslab and turns it into an explicit vector.

Value

An explicit vector describing the points in the hyperslab dimension

Author(s)

Holger Hoefling


Check if a file is an HDF5 file

Description

Check if a file is an HDF5 file

Usage

is_hdf5(name)

Arguments

name

The name of the file to check

Details

Uses the HDF5 functionH5Fis_hdf5 to check if a file is of type HDF5.

Value

Logical, TRUE if file is of type HDF5

Author(s)

Holger Hoefling


List Groups and Datasets in object

Description

List all Group (H5Group) and Dataset (H5D) names in the current object. This function is part of theh5 wrapper classes anduses$ls() to retrieve group names.

Usage

list.groups(object, path = "/", full.names = FALSE, recursive = TRUE,  ...)list.datasets(object, path = "/", full.names = FALSE,  recursive = TRUE, ...)list.objects(object, obj_type = c("H5I_GROUP", "H5I_DATASET",  "H5I_DATATYPE"), path = "/", full.names = FALSE, recursive = TRUE,  ...)

Arguments

object

CommonFG; Object implementing the CommonFG Interface (e.g.H5File,H5Group).

path

character; Path named to be used for iteration.

full.names

character; Specify if absolute DataSet path names should be returned.

recursive

logical; Specify if object should be traversed recursively.

...

Additional Parameters passed to$ls()

obj_type

character; Object type to be returned.

Value

character


Match arguments in a call to function and add default values

Description

Match arguments in a call to function and add default values

Usage

match.call.withDef(definition, call)

Arguments

definition

Definition of the function to match against

call

The call that should be matched

Details

Given the definition of a function and a call, it matches the argumentsso that they are named and inserts any default argument values wherethose are missing

Value

A call with named arguments and default values

Author(s)

Holger Hoefling


Get the names of the items in the group or at the/ root of the file

Description

Get the names of the items in the group or at the/ root of the file

Usage

## S3 method for class 'H5Group'names(x)## S3 method for class 'H5File'names(x)

Arguments

x

An object of classH5File orH5Group

Details

Works similar to the regularnames function for a list. The names of the items of either aH5File at the root or aH5Group are returned as a character vector.The items are then accessed, again similar to a list, using[[.

Value

A character vector with the names of the items in the group/file.

Author(s)

Holger Hoefling


Print a data frame with extended factor objects

Description

Print a data frame that includes extended factor objects

Usage

## S3 method for class 'data.frame_ext'print(x, ...)

Arguments

x

Thedata.frame_ext object to print; Is returned by ls fromH5FileandH5Group and this function allows for petter printing offactor_extso that the label instead of the value is printed.

...

Parameters to be passed on directly toprint.data.frame

Details

The regular print function for data-frames has special methods built-in for factors so thatthe label is printed instead of the constant. This function is intended to provide the same functionalityfor data frames with extended factors, by adding the classdata.frame_ext to the class vector.

Value

The object to print itself, invisibly

Author(s)

Holger Hoefling


Description

Print attributes

Usage

print_attributes(obj, max_to_print)

Arguments

obj

The obj for which to print the attributes

max_to_print

Maximum number of attributes to print

Details

Prints the names of the attributes up to a given maximum number

Value

Invisible NULL

Author(s)

Holger Hoefling


Description

Print the class and ID

Usage

print_class_id(obj, is_valid)

Arguments

obj

The object for which to print the class and id

is_valid

is the object valid

Details

Used by the print-methods

Value

invisible NULL

Author(s)

Holger Hoefling


Description

Print listing

Usage

print_listing(obj, max_to_print)

Arguments

obj

Object for which to print the listing

max_to_print

Maximum number of listing items to print

Details

Prints a smaller part of thels output of an object, up to a maximum number

Value

Invisible NULL

Author(s)

Holger Hoefling


Turn regulation evaluation into a selection for a space object

Description

Turn regulation evaluation into a selection for a space object

Usage

regularity_eval_to_selection(reg_eval_res)

Arguments

reg_eval_res

The result of theargs_regularity_evaluation function

Details

Analyzes the results of the regularity evaluation of each dimension and checks ifit needs to be into a hyperslab-selection or a point-selection. A hyperslab selection will be chosenwhenever there are significantly less of it than the number of selected points. The ratio is determinedby the optionhdf5r.point_to_hyperslab_ratio. If this is 1, then always hyperslabs will be used.

Value

Returns an object with either the point-matrix or the hyperslab-selection array. The resulting object isof classpoint_selection orhyperslab_selection.

Author(s)

Holger Hoefling


Get the id of a type of the dataset

Description

Get the id of a type of the dataset

Usage

standalone_H5D_get_type(h5d_id, native = TRUE)

Arguments

h5d_id

The id of the dataset to get the type from

native

Should it be ensured that it is a native type

Details

A function that just returns an id; it is written standalone so thatone can use it to avoid the creation of R6 classes that be a considerable overhead incertain circumstances

Value

An id; the user has to ensure that the id is eventually closed

Author(s)

Holger Hoefling


Select multiple hyperslabs in a space

Description

Select multiple hyperslabs in a space

Usage

standalone_H5S_select_multiple_hyperslab(id, hyperslab_array)

Arguments

id

The id of the space

hyperslab_array

The array with the hyperslabs. Is of dimension num_dim x num_hyperslabs x 4. With the elementsbeing start, count, stride and block

Details

Selects multiple hyperslabs in a space. Before the selection, the space selection will be cleared.

Value

NULL. The space has been manipulated as a side effect

Author(s)

Holger Hoefling


Convert a text description to a datatype

Description

Convert a text description to a datatype

Usage

text_to_dtype(text, lang_type = h5const$H5LT_DDL)

Arguments

text

The text to convert to the datatype

lang_type

The type of language to use; currently onlyH5LT_DDL is supported.

Details

Converts a text to a datatype using the HDF5 function H5LT_text_to_dtype.

Value

A datatype corresponding to the text with the appropriate class inheriting fromH5T.

Author(s)

Holger Hoefling


[8]ページ先頭

©2009-2025 Movatter.jp