| Title: | Interface to the 'HDF5' Binary Data Format |
|---|---|
| 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' API <https://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. |
| Authors: | Holger Hoefling [aut, cre], Mario Annau [aut], Zhengjia Wang [ctb], Novartis Institute for BioMedical Research (NIBR) [cph] |
| Maintainer: | Holger Hoefling <[email protected]> |
| License: | Apache License 2.0 | file LICENSE |
| Version: | 1.3.14 |
| Built: | 2026-09-21 07:07:12 UTC |
| Source: | https://github.com/dipterix/hdf5r |
Retrieving a copy of a type
## S3 method for class 'types_env' x$name ## S3 method for class 'types_env' x[[name]]## S3 method for class 'types_env' x$name ## S3 method for class 'types_env' x[[name]]
x |
The environment to request it from |
name |
The name of the type that is requested |
The types are stored in the environment h5types. These types should not be accessed
directly. Therefor, the $-operator is overloaded to ensure that every type that is accessed is a copy of the
original type
Returns an object that is a copy of a type that was requested
Holger Hoefling
Convert a double or integer to hex
as_hex(x)as_hex(x)
x |
The integer or double vector to convert |
Converts a double or integer to hex. Contrary to the built-in format,
this is done without any conversion of integers in double-format to integers in integer format.
Character string with the hex value
Holger Hoefling
Create an empty R-object according to a given HDF5 datatype
create_empty(nelem, dtype)create_empty(nelem, dtype)
nelem |
The number of elements to use for the object |
dtype |
The datatype based on which an empty R-object should be created |
With complex datatypes it can be useful to have a template that can be used so that the data input into a dataset conforms to expectations.
Given a datatype, this function creates an object of length nelem.
Here, an empty datatype refers to objects with value 0 for numeric objects and
empty strings.
An empty R object corresponding to the datatype that was passed in
Holger Hoefling
Create an extended factor
factor_ext(x, values, levels, drop = FALSE)factor_ext(x, values, levels, drop = FALSE)
x |
The object to convert to an |
values |
The values used for the levels; This is were |
levels |
The levels of the object; character string |
drop |
Should non-occurring levels be dropped |
An extended version of a regular factor variable. Instead of the levels having values from
1 to n where n is the number of levels, any integer value can be used for any level (including 64bit integers). If
all values are in the range of a regular 32-bit integer, it is coerced to int. Automatic coercion of extended factors
to factors in H5ToR_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.
An object of S3 class factor_ext
Holger Hoefling
factor_ext objectsVarious functions for factor_ext objects
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[...] <- value is.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(...)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[...] <- value is.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(...)
x |
Object of type |
... |
Currently ignored |
value |
The object to assign; here has be a level of |
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. The default, 'NULL', entails choosing 'max.levels' such that the levels print on one line of width 'width' (same for values). |
width |
only used when |
e1, e2
|
The two objects in the equality or inequality comparison. |
Extracts the underlying values of an object (the generic here)
Extracts the underlying values of a factor_ext object
Extracts the underlying values of a factor
Default of the values function; currently returns an error
Coerces factor_ext to a character-representation using it levels, not values
Single-item subsetting of a factor_ext object
Single-item subset assignment to a factor_ext object
Subsetting of a factor_ext object
Subset assignment to a factor_ext object
Check if it is a factor_ext object. Returns a logical
Checks if a factor_ext could be coerced to a factor. Return a logical.
Coerces to a factor, otherwise throws an error if not possible.
Prints a factor_ext object.
Compare two factor_ext for equality.
Compare two factor_ext for inequality.
Concatenate objects of type factor_ext.
Depending on the function
Holger Hoefling
Flatten a nested data.frame
flatten_df(df, factor_ext_to_char = FALSE)flatten_df(df, factor_ext_to_char = FALSE)
df |
The data.frame to flatten |
factor_ext_to_char |
Should extended factor variables be converted to characters (mainly for easy printing) |
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 of factor_ext to
character variables.
A flattened data.frame
Holger Hoefling
Guess the dimension of a chunk
guess_chunks( space_maxdims, dtype_size, chunk_size = getOption("hdf5r.chunk_size") )guess_chunks( space_maxdims, dtype_size, chunk_size = getOption("hdf5r.chunk_size") )
space_maxdims |
Maximal dimensions of the dataset |
dtype_size |
Size of the datatype that is stored |
chunk_size |
Size of each chunk in bytes |
The size of the chunk in bytes is first divided by the size of the datatype, giving the number of elements to 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 and redistributed to the other dimensions.
As a chunk is never allowed to be larger than the maximum dimension of the dataset itself,
An integer vector giving the dimension of the chunk
Holger Hoefling
Guess the HDF5 datatype of an R object
guess_nelem(x, dtype) guess_dim(x) guess_dtype( x, ds_dim = NULL, scalar = FALSE, string_len = getOption("hdf5r.default_string_len") )guess_nelem(x, dtype) guess_dim(x) guess_dtype( x, ds_dim = NULL, scalar = FALSE, string_len = getOption("hdf5r.default_string_len") )
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. For |
scalar |
Should the datatype be created so that |
string_len |
If a string is in the R object, the length to which the corresponding HDF5 type should be set. If it is a
positive integer, the string is of that length. If it is |
Given an object, it creates a datatype in HDF5 that would match this object. For simple datasets like arrays, this function is not so useful, but is very good for creating dataframes or hierarchical objects (like lists of dataframes) etc.
An object of class H5T that represents the HDF5-type of the Robj that was passed in
Holger Hoefling
Guess the dataspace of an object
guess_space(x, dtype, chunked = TRUE)guess_space(x, dtype, chunked = TRUE)
x |
The R object for which to guess the space |
dtype |
Object of type |
chunked |
Is the datatype chunked? If yes, |
Creates a dataspace that fits an R object so that it can be written into a dataset. This is used for example in dataset creation based on an R-object, not a specifically defined dimensions.
An object of type H5S
Holger Hoefling
The functions listed below provide a wrapper-interface compatible to functions specified in the h5 package. The author(s) have decided to deprecate h5 and join forces and still make the transition for h5 users as smooth as possible. Additionally, almost all testcases could be transferred to hdf5r to improve test coverage even more.
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)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)
... |
Additional parameters passed to |
object |
|
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 |
Below you can find a list of all h5 functions including hdf5r mappings.
Directly maps to H5File$new, see also H5File.
Maps to object$create_group where object implements CommonFG.
Uses object$open where object implements CommonFG.
Maps to object$create_dataset where object implements CommonFG.
Maps to object$read, see also H5D.
Maps to object$close_all for H5File and object$close
for other.
Maps to object$flush where object implements CommonFGDTA.
The following interfaces are defined:
Mario Annau (2017). h5: Interface to the 'HDF5' Library. R package version 0.9.9. https://github.com/mannau/h5
This class represents an HDF5 attribute. Usually it is easier to read and write attributes for
groups, datasets and committed datatypes using the functions documented in h5attributes.
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.
Object of class H5A.
H5RefClass -> H5A
H5A$flush()This function implements the HDF5-API function H5Fflush. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.
H5A$flush(scope = h5const$H5F_SCOPE_GLOBAL)
scopeThe scope of the flush; one of the H5F_SCOPE_* values in h5const.
H5A$get_filename()This function implements the HDF5-API function H5Fget_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.
H5A$get_filename()
H5A$get_info()This function implements the HDF5-API function H5Aget_info. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5A$get_info()
H5A$attr_name()This function implements the HDF5-API function H5Aget_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5A$attr_name()
H5A$get_space()This function implements the HDF5-API function H5Aget_space. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5A$get_space()
H5A$get_type()This function implements the HDF5-API function H5Aget_type. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5A$get_type(native = TRUE)
nativeLogical; should the native version of the datatype be returned.
H5A$get_storage_size()This function implements the HDF5-API function H5Aget_storage_size. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5A$get_storage_size()
H5A$read_low_level()Only for advanced users. See documentation for read instead. This function implements the HDF5-API function H5Aread. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5A$read_low_level(buffer, mem_type, duplicate_buffer = FALSE)
bufferThe raw buffer to read into or write from.
mem_typeThe memory datatype to use for the transfer; an object of class H5T.
duplicate_bufferLogical; should the buffer be copied before it is returned.
H5A$read()Reads the data of the attribute and returns it as an R-object
H5A$read(flags = getOption("hdf5r.h5tor_default"), drop = TRUE)
flagsConversion rules for integer values. See also h5const
dropLogical. Should dimensions of length 1 be dropped (R-default for arrays)
H5A$write_low_level()Only for advanced users. See documentation for write instead. This function implements the HDF5-API function H5Awrite. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5A$write_low_level(buffer, mem_type)
bufferThe raw buffer to read into or write from.
mem_typeThe memory datatype to use for the transfer; an object of class H5T.
H5A$write()Writes the data of robj to the attribute
H5A$write(robj, mem_type = NULL, flush = getOption("hdf5r.flush_on_write"))
robjThe object to write into the attribute
mem_typeThe 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.
flushLogical; should the file be flushed after the write.
H5A$print()Prints information for the dataset
H5A$print(...)
...ignored
Holger Hoefling
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()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()
Interface for HDF5 attributes
h5attributes(x) h5attr_names(x) h5attr(x, which) h5attr(x, which) <- valueh5attributes(x) h5attr_names(x) h5attr(x, which) h5attr(x, which) <- value
x |
The object to which to attach the attribute to or retrieve it from. Can be one of |
which |
The name of the attribute to assign it to |
value |
The value to assign to the attribute. |
Implements high-level functions that allows interactions with HDF5-attributes in a way very similar to regular R-object attributes in R are handled.
For h5attributes, a named list with the content of the attributes read out. For h5attr_names,
a vector of names of the attributes attached to the object x. For h5attr, the content of the attribute and
for h5attr<-, the assignment, the original object to which the attributes are attached (so that chaining is possible).
Holger Hoefling
These are all constants used in HDF5. They are stored in an environment with locked bindings so that
they cannot be changed. An overview of all constants can be seen with h5const$overview, listing all of them.
Each constant can be accessed using $ and the name of the constant. See the examples below.
There are also some flags that govern edge cases of conversion from HDF5 to R. This is related to how integers are being treated and
the 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 term H5TOR. There are currently possible values
Doesn't do any conversion. Every integer datatype with more than 32 bit is returned as 64bit integers. For unsigned 64bit integers, the conversion to signed 64bit integers is done by truncation
Under this setting, whenever a 64 bit integer would be returned, it is checked if it would also fit into a 32 bit integer without data loss and returned as such if possible
Under this setting, whenever a 64 bit integer would be returned, it is checked if it would also fit into a 64 bit floating point value without data loss and returned as such if possible
Combines H5TOR_CONV_INT64_INT_NOLOSS and H5TOR_CONV_INT64_FLOAT_NOLOSS and is set
as the default in the hdf5r.h5tor_default option.
Under this setting, whenever a 64 bit integer would be returned, it is coerced to a double
even if this results in a loss of precision. If a loss of precision occurs, a warning is issued. Please note that this also overrides
the use of H5TOR_CONV_UNIT64_NA. As loss of precision is already accepted, UINT64-values that are larger than LLONG_MAX will be represented
as their next possible floating point value.
When converting an unsigned 64bit integer, any values that don't fit into a signed 64bit integer are
set to NA. If this flag is not set, then the values will be truncated to LLONG_MAX, the largest 64bit signed integer.
Is both H5TOR_CONV_INT64_INT and H5TOR_CONV_UNIT64_FLOAT
Holger Hoefling
h5const$overview h5const$H5F_ACC_RDWR h5const$H5F_ACC_DEFAULT # Combining flags bitwOr(h5const$H5TOR_CONV_UINT64_NA, h5const$H5TOR_CONV_INT64_INT_NOLOSS)h5const$overview h5const$H5F_ACC_RDWR h5const$H5F_ACC_DEFAULT # Combining flags bitwOr(h5const$H5TOR_CONV_UINT64_NA, h5const$H5TOR_CONV_INT64_INT_NOLOSS)
In HDF5, datasets can be located in a group (see H5Group) or at the
root of a file (see H5File). 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 specifying
an explicit datatype (for available datatypes see h5types$overview as well as the dimension.
In addition, other features are supported such as transparent compression (for which a chunk-size can be selected).
In order to create a dataset, the create_dataset methods of either H5Group or
H5File should be used. Please see the documentation there for how to create them.
The most important parts of a dataset are the
The space of the dataset. It describes the dimension of the dataset as well as the maximum dimensions.
Can be obtained using the get_space of the H5S object.
The datatypes that is being used in the dataset. Can be obtained using the get_type method.
See H5T to get more information about using datatypes.
In order to read and write datasets, the read and write methods are available. In addition, the standard way of using
[ to access arrays is supported as well (see H5S_H5D_subset_assign for more help).
Other information/action of possible interest are
The size of the dataset can be extracted using get_storage_size
The size of the dataset can be changed using the set_extent method
Please also note the active methods
Dimension of the dataset
Maximum dimensions of the dataset
Dimension of the chunks
Returns the space, type, property-list and dimensions
Object of class H5D.
H5RefClass -> H5D
dimsGet the dimension of the dataset
maxdimsGet the maximal dimension of the dataset
chunk_dimsReturn the dimension of the chunks. NA if the dataset is not chunked
key_infoReturns 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 return Inf for type_size_variable and the underlying size for type_size_raw
H5D$get_obj_name()This function implements the HDF5-API function H5Iget_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_i.html for details.
H5D$get_obj_name()
H5D$create_attr()This function implements the HDF5-API function H5Acreate2. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5D$create_attr(attr_name, robj = NULL, dtype = NULL, space = NULL)
H5D$attr_open()This function implements the HDF5-API function H5Aopen. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5D$attr_open(attr_name)
attr_nameThe name of the attribute.
H5D$create_attr_by_name()This function implements the HDF5-API function H5Acreate_by_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5D$create_attr_by_name( attr_name, obj_name, robj = NULL, dtype = NULL, space = NULL, link_access_pl = h5const$H5P_DEFAULT )
attr_nameThe name of the attribute.
obj_nameThe name of the object, relative to the object the method is called on.
robjAn R object to use as a template for the datatype and dataspace.
dtypeThe datatype to use; an object of class H5T.
spaceThe dataspace to use; an object of class H5S.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5D$attr_open_by_name()This function implements the HDF5-API function H5Aopen_by_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5D$attr_open_by_name( attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT )
attr_nameThe name of the attribute.
obj_nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5D$attr_open_by_idx()This function implements the HDF5-API function H5Aopen_by_idx. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5D$attr_open_by_idx( n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT )
nThe index of the item to access; zero-based.
obj_nameThe name of the object, relative to the object the method is called on.
idx_typeThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5D$attr_exists_by_name()This function implements the HDF5-API function H5Aexists_by_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5D$attr_exists_by_name( attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT )
attr_nameThe name of the attribute.
obj_nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5D$attr_exists()This function implements the HDF5-API function H5Aexists. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5D$attr_exists(attr_name)
attr_nameThe name of the attribute.
H5D$attr_rename_by_name()This function implements the HDF5-API function H5Arename_by_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5D$attr_rename_by_name( old_attr_name, new_attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT )
old_attr_nameThe current name of the attribute.
new_attr_nameThe new name of the attribute.
obj_nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5D$attr_rename()This function implements the HDF5-API function H5Arename. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5D$attr_rename(old_attr_name, new_attr_name)
old_attr_nameThe current name of the attribute.
new_attr_nameThe new name of the attribute.
H5D$attr_delete()This function implements the HDF5-API function H5Adelete. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5D$attr_delete(attr_name)
attr_nameThe name of the attribute.
H5D$attr_delete_by_name()This function implements the HDF5-API function H5Adelete_by_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5D$attr_delete_by_name( attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT )
attr_nameThe name of the attribute.
obj_nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5D$attr_delete_by_idx()This function implements the HDF5-API function H5Adelete_by_idx. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5D$attr_delete_by_idx( n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT )
nThe index of the item to access; zero-based.
obj_nameThe name of the object, relative to the object the method is called on.
idx_typeThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5D$attr_info_by_name()This function implements the HDF5-API function H5Aget_info_by_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5D$attr_info_by_name( attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT )
attr_nameThe name of the attribute.
obj_nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5D$attr_info_by_idx()This function implements the HDF5-API function H5Aget_info_by_idx. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5D$attr_info_by_idx( n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT )
nThe index of the item to access; zero-based.
obj_nameThe name of the object, relative to the object the method is called on.
idx_typeThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5D$attr_name_by_idx()This function implements the HDF5-API function H5Aget_name_by_idx. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5D$attr_name_by_idx( n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT )
nThe index of the item to access; zero-based.
obj_nameThe name of the object, relative to the object the method is called on.
idx_typeThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5D$attr_get_number()This function implements the HDF5-API function H5Aget_num_attrs. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5D$attr_get_number()
H5D$flush()This function implements the HDF5-API function H5Fflush. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.
H5D$flush(scope = h5const$H5F_SCOPE_GLOBAL)
scopeThe scope of the flush; one of the H5F_SCOPE_* values in h5const.
H5D$get_filename()This function implements the HDF5-API function H5Fget_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.
H5D$get_filename()
H5D$new()Initializes a new dataset-object. Only for internal use. Use the create_dataset function for H5Group and H5File objects
H5D$new(id = NULL)
idFor internal use only
H5D$get_space()This function implements the HDF5-API function H5Dget_space. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for details.
H5D$get_space()
H5D$get_space_status()This function implements the HDF5-API function H5Dget_space_status. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for details.
H5D$get_space_status()
H5D$get_type()This function implements the HDF5-API function H5Dget_type. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for details.
H5D$get_type(native = TRUE)
nativeLogical; should the native version of the datatype be returned.
H5D$get_create_plist()This function implements the HDF5-API function H5Dget_create_plist. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for details.
H5D$get_create_plist()
H5D$get_access_plist()This function implements the HDF5-API function H5Dget_access_plist. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for details.
H5D$get_access_plist()
H5D$get_offset()This function implements the HDF5-API function H5Dget_offset. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for details.
H5D$get_offset()
H5D$get_storage_size()This function implements the HDF5-API function H5Dget_storage_size. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for details.
H5D$get_storage_size()
H5D$vlen_get_buf_size()This function implements the HDF5-API function H5Dvlen_get_buf_size. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for details.
H5D$vlen_get_buf_size(type, space)
H5D$vlen_reclaim()This function implements the HDF5-API function H5Dvlen_reclaim. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for details.
H5D$vlen_reclaim(buffer, type, space, dataset_xfer_pl = h5const$H5P_DEFAULT)
bufferThe raw buffer to read into or write from.
typeThe type to use. For a dataspace one of "simple", "scalar" or "null"; otherwise an object of class H5T.
spaceThe dataspace to use; an object of class H5S.
dataset_xfer_plThe dataset transfer property list. See H5P_DATASET_XFER.
H5D$read_low_level()This function is for advanced users. It is recommended to use read 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 at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for details. It reads the data in the dataset as specified by mem_space and return it as an R-obj
H5D$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
)
file_spaceAn HDF5-space, represented as class H5S that determines which part of the dataset is being read. Can also be given as an id
mem_spaceThe space as it is represented in memory; advanced feature; may be removed in the future. Can also be given as an id.
mem_typeMemory type; extracted from the dataset if null (can be passed in for efficiency reasons Can also be given as an id.
dataset_xfer_plDataset transfer property list. See H5P_DATASET_XFER
flagsConversion rules for integer values. See also h5const
set_dimIf TRUE, the dimension attribute is set in the return value. How it is set is determined by dim_to_set.
dim_to_setThe dimension to set; Has to be numeric and needs to be specified if set_dim is TRUE. If the result is a data.frame, i.e. the data-type is a compound, then the dimension is ignored as the correct dimension is already set.
dropLogical. Should dimensions of length 1 be dropped (R-default for arrays)
H5D$read()Main interface for reading data from the dataset. It is the function that is used by [, where all indices are being passed in the parameter args.
H5D$read(
args = NULL,
dataset_xfer_pl = h5const$H5P_DEFAULT,
flags = getOption("hdf5r.h5tor_default"),
drop = TRUE,
envir = parent.frame()
)
argsThe 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 to NULL, the entire dataset will be read.
dataset_xfer_plAn object of class H5P_DATASET_XFER.
flagsSome flags governing edge cases of conversion from HDF5 to R. This is related to how integers are being treated and the 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 of h5const. The relevant ones start with the term H5TOR and are documented there. The default set here returns a regular 32bit integer if it doesn't lead to an overflow and returns a 64bit integer from the bit64 package otherwise. For 64bit unsigned int that are larger than 64bit signed int, it return a double. This looses precision, however.
dropLogical. When reading data, should dimensions of size 1 be dropped.
envirThe environment in which to evaluate args
The data that was read as an R object
H5D$write_low_level()This function is for advanced users. It is recommended to use read instead or the [<- interface as used for arrays. This function implements the HDF5-API function H5Dwrite, with some changes to accommodate R. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for details. It writes that data from the robj into the dataset.
H5D$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")
)
robjThe object to write into the dataset
file_spaceAn HDF5-space, represented as class H5S that determines which part of the dataset is being written.
mem_spaceThe space as it is represented in memory; advanced feature; may be removed in the future
mem_typeMemory type; extracted from the dataset if null (can be passed in for efficiency reasons
dataset_xfer_plDataset transfer property list. See H5P_DATASET_XFER
flushShould a flush be done after the write
H5D$write()Main interface for writing data to the dataset. It is the function that is used by [<-, where all indices are being passed in the parameter args.
H5D$write( args, value, dataset_xfer_pl = h5const$H5P_DEFAULT, envir = parent.frame() )
argsThe 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 to NULL, the entire dataset will be read.
valueThe data to write to the dataset
dataset_xfer_plAn object of class H5P_DATASET_XFER.
envirThe environment in which to evaluate args
The HDF5 dataset object, returned invisibly
H5D$set_extent()This function implements the HDF5-API function H5Dset_extent. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for details.
H5D$set_extent(dims)
dimsThe dimensions of the object.
H5D$get_fill_value()This function implements the HDF5-API function H5Pget_fill_value, automatically supplying the datatype of the dataset for convenience. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5D$get_fill_value()
H5D$create_reference()This function implements the HDF5-API function H5Rcreate. The parameters are interpreted as in '['. The function always create H5R_DATASET_REGION references Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_r.html for details.
H5D$create_reference(...)
...Further arguments; currently ignored.
H5D$print()Prints information for the dataset
H5D$print(..., max.attributes = 10)
...ignored
max.attributesMaximum number of attribute names to print
H5D$obj_info()This function implements the HDF5-API function H5Oget_info. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.
H5D$obj_info(remove_internal_use_only = TRUE)
remove_internal_use_onlyLogical; should fields that are only of internal use be dropped from the result.
Holger Hoefling
# First create a file to create datasets in it fname <- tempfile(fileext = ".h5") file <- H5File$new(fname, mode = "a") # Show the 3 different ways how to create a dataset file[["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 dataset dset$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 dataset dset$write(args=list(1:3, 1:2), value=11:16) dset[4:5, 1:2] <- -(1:4) dset[,] # Extract key information dset$dims dset$maxdims dset$chunk_dims dset$key_info dset file$close_all() file.remove(fname)# First create a file to create datasets in it fname <- tempfile(fileext = ".h5") file <- H5File$new(fname, mode = "a") # Show the 3 different ways how to create a dataset file[["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 dataset dset$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 dataset dset$write(args=list(1:3, 1:2), value=11:16) dset[4:5, 1:2] <- -(1:4) dset[,] # Extract key information dset$dims dset$maxdims dset$chunk_dims dset$key_info dset file$close_all() file.remove(fname)
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 the H5RefClass.
HDF5 files can be opened or generated using the H5File$new() function and
a specified file access mode. H5File$new() returns a H5File object
which can be used to access H5Groups and Datasets (see H5D)
using subsetting parameters or according class methods.
HDF5 files which have been created or opened through H5File$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:
Similar to a file system folder, used to organize HDF5 objects in a hierarchical way, see also H5Group
Objects to store actual data, see also H5D
Meta data objects to store extra information about Files, Groups and Datasets, see also H5A
Object of class H5File.
The following functions are defined to extract HDF5 file contents:
list.groupsList HDF5 groups in file.
list.datasetsList HDF5 datasets in file.
namesList all items in a file or group (applicable for H5File and H5Group)
list.attributesList Attributes of HDF5 object (file, group or dataset).
h5attr_namesAttribute names of an HDF5 object; similar to list.attributes
H5RefClass -> H5File
modeThe mode the file was opened with.
filenameThe name of the file on disk.
namesReturns the names of the items in the group or at the root of the file
H5File$open()Opens groups, datasets or types using the appropriate HDF5-API functions. Please see the documentation at https://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 and https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for general objects.
H5File$open( name, link_access_pl = h5const$H5P_DEFAULT, dataset_access_pl = h5const$H5P_DEFAULT, type_access_pl = h5const$H5P_DEFAULT )
nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
dataset_access_plThe dataset access property list. See H5P_DATASET_ACCESS.
type_access_plThe datatype access property list.
H5File$open_by_idx()This function implements the HDF5-API function H5Oopen_by_idx. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.
H5File$open_by_idx( n, group_name = ".", index_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT )
nThe index of the item to access; zero-based.
group_nameThe name of the group, relative to the object the method is called on.
index_typeThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5File$ls()Returns the contents of a file or group as a data.frame.
H5File$ls( recursive = FALSE, detailed = FALSE, index_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_INC, link_access_pl = h5const$H5P_DEFAULT, dataset_access_pl = h5const$H5P_DEFAULT, type_access_pl = h5const$H5P_DEFAULT )
recursiveLogical; should the listing descend into subgroups.
detailedLogical; should a more detailed listing be returned.
index_typeThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
dataset_access_plThe dataset access property list. See H5P_DATASET_ACCESS.
type_access_plThe datatype access property list.
H5File$exists()This function implements the HDF5-API function H5Lexists. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5File$exists(name, link_access_pl = h5const$H5P_DEFAULT)
nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5File$path_valid()This function implements the HDF5-API function H5LTpath_valid. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l_t.html for details.
H5File$path_valid(path, check_object_valid = TRUE)
pathThe path of the object inside the file.
check_object_validLogical; should the object be checked for validity first.
H5File$link()This function implements the HDF5-API function H5Olink. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.
H5File$link( obj, new_link_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT )
objThe HDF5 object to use.
new_link_nameThe new name of the link.
link_create_plThe link creation property list. See H5P_LINK_CREATE.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5File$obj_copy_to()This function implements the HDF5-API function H5Ocopy. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.
H5File$obj_copy_to( dst_loc, dst_name, src_name, object_copy_pl = h5const$H5P_DEFAULT, link_create_pl = h5const$H5P_DEFAULT )
dst_locThe destination location; an object of class H5File or H5Group.
dst_nameThe name of the destination object.
src_nameThe name of the source object.
object_copy_plThe object copy property list. See H5P_OBJECT_COPY.
link_create_plThe link creation property list. See H5P_LINK_CREATE.
H5File$obj_copy_from()This function implements the HDF5-API function H5Ocopy. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.
H5File$obj_copy_from( src_loc, src_name, dst_name, object_copy_pl = h5const$H5P_DEFAULT, link_create_pl = h5const$H5P_DEFAULT )
src_locsrc_nameThe name of the source object.
dst_nameThe name of the destination object.
object_copy_plThe object copy property list. See H5P_OBJECT_COPY.
link_create_plThe link creation property list. See H5P_LINK_CREATE.
H5File$group_info()This function implements the HDF5-API function H5Gget_info. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_g.html for details.
H5File$group_info()
H5File$group_info_by_name()This function implements the HDF5-API function H5Gget_info_by_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_g.html for details.
H5File$group_info_by_name(name, link_access_pl = h5const$H5P_DEFAULT)
nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5File$group_info_by_idx()This function implements the HDF5-API function H5Gget_info_by_idx. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_g.html for details.
H5File$group_info_by_idx( n, group_name = ".", index_field = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT )
nThe index of the item to access; zero-based.
group_nameThe name of the group, relative to the object the method is called on.
index_fieldThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5File$create_group()This function implements the HDF5-API function H5Gcreate2 and H5Gcreate_anon (if name is NULL). Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_g.html for regular groups and https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_g.html for anonymous groups for details.
H5File$create_group( name, link_create_pl = h5const$H5P_DEFAULT, group_create_pl = h5const$H5P_DEFAULT, group_access_pl = h5const$H5P_DEFAULT )
nameThe name of the object, relative to the object the method is called on.
link_create_plThe link creation property list. See H5P_LINK_CREATE.
group_create_plThe group creation property list.
group_access_plThe group access property list.
H5File$create_dataset()This function is the main interface to create a new dataset. Its parameters allow for customization of the default behavior, 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 at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for regular groups and https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for anonymous groups for details.
H5File$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 )
nameThe name of the new dataset. If missing, an anonymous dataset is created
robjAn R-object to take as a template for creating the dataset. Either robj or both dtype and space have to be provided
dtypeThe datatype to use for the creation of the object. Can be null if robj is given.
spaceThe space to use for the object creation. Can be null if robj is given. Otherwise an object of type H5S which specifies the dimensions of the dataset.
dimsDimension of the new dataset; used if space is NULL. overwrite the dimension guessed from robj if robj is given.
chunk_dimsSize 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 in the hdf5r.chunk_size option. See also guess_chunks for a more detailed explanation. If set to NULL, then no chunking is used, unless explicitly set in dataset_create_pl.
gzip_levelOnly if chunk_dims is not null. If given, then the dataset_create_pl is set to enable zipping at the level given here. If set to NULL, then gzip is not set (but could be set otherwise in dataset_create_pl
link_create_plLink creation property list. See H5P_LINK_CREATE
dataset_create_plDataset creation property list. See H5P_DATASET_CREATE
dataset_access_plDataset access property list. See H5P_DATASET_ACCESS
H5File$commit()This function implements the HDF5-API function H5Tcommit2. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5File$commit( name, dtype, link_create_pl = h5const$H5P_DEFAULT, type_create_pl = h5const$H5P_DEFAULT, type_access_pl = h5const$H5P_DEFAULT )
nameThe name of the object, relative to the object the method is called on.
dtypeThe datatype to use; an object of class H5T.
link_create_plThe link creation property list. See H5P_LINK_CREATE.
type_create_plThe datatype creation property list.
type_access_plThe datatype access property list.
H5File$link_create_hard()This function implements the HDF5-API function H5Lcreate_hard. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5File$link_create_hard( obj_loc, obj_name, link_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT )
obj_locThe location of the object; an object of class H5File or H5Group.
obj_nameThe name of the object, relative to the object the method is called on.
link_nameThe name of the link.
link_create_plThe link creation property list. See H5P_LINK_CREATE.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5File$link_create_soft()This function implements the HDF5-API function H5Lcreate_soft. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5File$link_create_soft( target_path, link_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT )
target_pathThe path of the target object.
link_nameThe name of the link.
link_create_plThe link creation property list. See H5P_LINK_CREATE.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5File$link_create_external()This function implements the HDF5-API function H5Lcreate_external. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5File$link_create_external( target_filename, target_obj_name, link_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT )
target_filenameThe name of the file that holds the target object.
target_obj_nameThe name of the target object.
link_nameThe name of the link.
link_create_plThe link creation property list. See H5P_LINK_CREATE.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5File$link_exists()This function implements the HDF5-API function H5Lexists. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5File$link_exists(name, link_access_pl = h5const$H5P_DEFAULT)
nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5File$link_move_from()This function implements the HDF5-API function H5Lmove. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5File$link_move_from( src_loc, src_name, dst_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT )
src_locsrc_nameThe name of the source object.
dst_nameThe name of the destination object.
link_create_plThe link creation property list. See H5P_LINK_CREATE.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5File$link_move_to()This function implements the HDF5-API function H5Lmove. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5File$link_move_to( dst_loc, dst_name, src_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT )
dst_locThe destination location; an object of class H5File or H5Group.
dst_nameThe name of the destination object.
src_nameThe name of the source object.
link_create_plThe link creation property list. See H5P_LINK_CREATE.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5File$link_copy_from()This function implements the HDF5-API function H5Lcopy. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5File$link_copy_from( src_loc, src_name, dst_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT )
src_locsrc_nameThe name of the source object.
dst_nameThe name of the destination object.
link_create_plThe link creation property list. See H5P_LINK_CREATE.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5File$link_copy_to()This function implements the HDF5-API function H5Lcopy. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5File$link_copy_to( dst_loc, dst_name, src_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT )
dst_locThe destination location; an object of class H5File or H5Group.
dst_nameThe name of the destination object.
src_nameThe name of the source object.
link_create_plThe link creation property list. See H5P_LINK_CREATE.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5File$link_delete()This function implements the HDF5-API function H5Ldelete. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5File$link_delete(name, link_access_pl = h5const$H5P_DEFAULT)
nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5File$link_delete_by_idx()This function implements the HDF5-API function H5Ldelete_by_idx. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5File$link_delete_by_idx( n, group_name = ".", index_field = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT )
nThe index of the item to access; zero-based.
group_nameThe name of the group, relative to the object the method is called on.
index_fieldThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5File$link_info()This function implements the HDF5-API function H5Lget_info. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5File$link_info(name, link_access_pl = h5const$H5P_DEFAULT)
nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5File$link_info_by_idx()This function implements the HDF5-API function H5Lget_info_by_idx. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5File$link_info_by_idx( n, group_name = ".", index_field = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT )
nThe index of the item to access; zero-based.
group_nameThe name of the group, relative to the object the method is called on.
index_fieldThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5File$link_value()This function implements the HDF5-API function H5Lget_val. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5File$link_value(name, link_access_pl = h5const$H5P_DEFAULT)
nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5File$link_value_by_idx()This function implements the HDF5-API function H5Lget_val_by_idx. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5File$link_value_by_idx( n, group_name = ".", index_field = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT )
nThe index of the item to access; zero-based.
group_nameThe name of the group, relative to the object the method is called on.
index_fieldThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5File$link_name_by_idx()This function implements the HDF5-API function H5Lget_name_by_idx. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5File$link_name_by_idx( n, group_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT )
nThe index of the item to access; zero-based.
group_nameThe name of the group, relative to the object the method is called on.
idx_typeThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5File$mount()This function implements the HDF5-API function H5Fmount. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.
H5File$mount(name, child)
nameThe name of the object, relative to the object the method is called on.
childThe object to mount; an object of class H5File.
H5File$unmount()This function implements the HDF5-API function H5Funmount. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.
H5File$unmount(name)
nameThe name of the object, relative to the object the method is called on.
H5File$get_obj_name()This function implements the HDF5-API function H5Iget_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_i.html for details.
H5File$get_obj_name()
H5File$create_attr()This function implements the HDF5-API function H5Acreate2. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5File$create_attr(attr_name, robj = NULL, dtype = NULL, space = NULL)
H5File$attr_open()This function implements the HDF5-API function H5Aopen. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5File$attr_open(attr_name)
attr_nameThe name of the attribute.
H5File$create_attr_by_name()This function implements the HDF5-API function H5Acreate_by_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5File$create_attr_by_name( attr_name, obj_name, robj = NULL, dtype = NULL, space = NULL, link_access_pl = h5const$H5P_DEFAULT )
attr_nameThe name of the attribute.
obj_nameThe name of the object, relative to the object the method is called on.
robjAn R object to use as a template for the datatype and dataspace.
dtypeThe datatype to use; an object of class H5T.
spaceThe dataspace to use; an object of class H5S.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5File$attr_open_by_name()This function implements the HDF5-API function H5Aopen_by_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5File$attr_open_by_name( attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT )
attr_nameThe name of the attribute.
obj_nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5File$attr_open_by_idx()This function implements the HDF5-API function H5Aopen_by_idx. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5File$attr_open_by_idx( n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT )
nThe index of the item to access; zero-based.
obj_nameThe name of the object, relative to the object the method is called on.
idx_typeThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5File$attr_exists_by_name()This function implements the HDF5-API function H5Aexists_by_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5File$attr_exists_by_name( attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT )
attr_nameThe name of the attribute.
obj_nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5File$attr_exists()This function implements the HDF5-API function H5Aexists. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5File$attr_exists(attr_name)
attr_nameThe name of the attribute.
H5File$attr_rename_by_name()This function implements the HDF5-API function H5Arename_by_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5File$attr_rename_by_name( old_attr_name, new_attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT )
old_attr_nameThe current name of the attribute.
new_attr_nameThe new name of the attribute.
obj_nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5File$attr_rename()This function implements the HDF5-API function H5Arename. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5File$attr_rename(old_attr_name, new_attr_name)
old_attr_nameThe current name of the attribute.
new_attr_nameThe new name of the attribute.
H5File$attr_delete()This function implements the HDF5-API function H5Adelete. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5File$attr_delete(attr_name)
attr_nameThe name of the attribute.
H5File$attr_delete_by_name()This function implements the HDF5-API function H5Adelete_by_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5File$attr_delete_by_name( attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT )
attr_nameThe name of the attribute.
obj_nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5File$attr_delete_by_idx()This function implements the HDF5-API function H5Adelete_by_idx. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5File$attr_delete_by_idx( n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT )
nThe index of the item to access; zero-based.
obj_nameThe name of the object, relative to the object the method is called on.
idx_typeThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5File$attr_info_by_name()This function implements the HDF5-API function H5Aget_info_by_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5File$attr_info_by_name( attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT )
attr_nameThe name of the attribute.
obj_nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5File$attr_info_by_idx()This function implements the HDF5-API function H5Aget_info_by_idx. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5File$attr_info_by_idx( n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT )
nThe index of the item to access; zero-based.
obj_nameThe name of the object, relative to the object the method is called on.
idx_typeThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5File$attr_name_by_idx()This function implements the HDF5-API function H5Aget_name_by_idx. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5File$attr_name_by_idx( n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT )
nThe index of the item to access; zero-based.
obj_nameThe name of the object, relative to the object the method is called on.
idx_typeThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5File$attr_get_number()This function implements the HDF5-API function H5Aget_num_attrs. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5File$attr_get_number()
H5File$create_reference()This function implements the HDF5-API function H5Rcreate. If space=NULL then a H5R_OBJECT reference is created, otherwise a H5R_DATASET_REGION reference Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_r.html for details.
H5File$create_reference(name = ".", space = NULL)
nameThe name of the object, relative to the object the method is called on.
spaceThe dataspace to use; an object of class H5S.
H5File$flush()This function implements the HDF5-API function H5Fflush. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.
H5File$flush(scope = h5const$H5F_SCOPE_GLOBAL)
scopeThe scope of the flush; one of the H5F_SCOPE_* values in h5const.
H5File$get_filename()This function implements the HDF5-API function H5Fget_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.
H5File$get_filename()
H5File$new()Opens or creates a new HDF5 File
H5File$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
)
filenameName of the file
modeHow to open it. a creates a new file or opens an existing one for read/write. r opens an existing file for reading, r+ opens an existing file for read/write. w creates a file, truncating any existing ones and w-/x are synonyms, creating a file and failing if it already exists.
file_create_plThe file creation property list. See H5P_FILE_CREATE.
file_access_plThe file access property list. See H5P_FILE_ACCESS.
idAn HDF5 id; for internal use only.
H5File$get_obj_count()This function implements the HDF5-API function H5Fget_obj_count. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.
H5File$get_obj_count(types = h5const$H5F_OBJ_ALL)
typesThe types of object to count; one or more of the H5F_OBJ_* values in h5const.
H5File$get_obj_ids()This function implements the HDF5-API function H5Fget_obj_ids. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.
H5File$get_obj_ids(types = h5const$H5F_OBJ_ALL)
typesThe types of object to count; one or more of the H5F_OBJ_* values in h5const.
H5File$get_filesize()This function implements the HDF5-API function H5Fget_filesize. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.
H5File$get_filesize()
H5File$file_info()This function implements the HDF5-API function H5Fget_info2. Please see the documentation at https://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
H5File$file_info()
H5File$get_intent()This function implements the HDF5-API function H5Fget_intent. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.
H5File$get_intent()
H5File$close_all()Closes the file, flushes it and also closes all open objects that are still open in it. This is the recommended way of closing any file. If not all objects in a file are closed, the file remains open and cannot be re-opened the regular way.
H5File$close_all(close_self = TRUE)
close_selfLogical; should the object itself be closed as well.
H5File$print()Prints information for the file
H5File$print(..., max.attributes = 10, max.listing = 10)
...ignored
max.attributesMaximum number of attribute names to print
max.listingMaximum number of ls-items to print
H5File$obj_info_by_idx()This function implements the HDF5-API function H5Oget_info_by_idx. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.
H5File$obj_info_by_idx( n, group_name = ".", index_field = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, remove_internal_use_only = TRUE )
nThe index of the item to access; zero-based.
group_nameThe name of the group, relative to the object the method is called on.
index_fieldThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
remove_internal_use_onlyLogical; should fields that are only of internal use be dropped from the result.
H5File$obj_info_by_name()This function implements the HDF5-API function H5Oget_info_by_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.
H5File$obj_info_by_name(object_name, remove_internal_use_only = TRUE)
object_nameThe name of the object, relative to the object the method is called on.
remove_internal_use_onlyLogical; should fields that are only of internal use be dropped from the result.
H5File$obj_info()This function implements the HDF5-API function H5Oget_info. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.
H5File$obj_info(remove_internal_use_only = TRUE)
remove_internal_use_onlyLogical; should fields that are only of internal use be dropped from the result.
Holger Hoefling, Mario Annau
# 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:10 h5attr(file, "testattrib") <- LETTERS[1:10] file$create_group("testgroup") file[["testgroup/testdataset2"]] <- 1:10 # Show contents of file file # Close file and delete file$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:10 file[["testgroup2/testset2"]] <- 11:20 file[["testgroup3/testset3"]] <- 21:30 # Extract first 3 elements from each dataset and combine result to matrix sapply(list.datasets(file, recursive = TRUE), function(x) file[[x]][1:3]) # Close file file$close_all() file.remove(fname)# 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:10 h5attr(file, "testattrib") <- LETTERS[1:10] file$create_group("testgroup") file[["testgroup/testdataset2"]] <- 1:10 # Show contents of file file # Close file and delete file$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:10 file[["testgroup2/testset2"]] <- 11:20 file[["testgroup3/testset3"]] <- 21:30 # Extract first 3 elements from each dataset and combine result to matrix sapply(list.datasets(file, recursive = TRUE), function(x) file[[x]][1:3]) # Close file file$close_all() file.remove(fname)
Trigger the HDF5 garbage collection
h5garbage_collect()h5garbage_collect()
This function triggers the HDF5 internal garbage collection. It is independent of the R garbage collection and currently has to be triggered by hand.
Invisible NULL
Holger Hoefling
HDF5-Groups are essentially equivalent to directories in a file system. Inside the groups, other groups or datasets can
be created. For the most parts, groups behave like files, so please also look at the documentation of H5File.
Object of class H5Group.
H5RefClass -> H5Group
namesReturns the names of the items in the group or at the root of the file
H5Group$open()Opens groups, datasets or types using the appropriate HDF5-API functions. Please see the documentation at https://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 and https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for general objects.
H5Group$open( name, link_access_pl = h5const$H5P_DEFAULT, dataset_access_pl = h5const$H5P_DEFAULT, type_access_pl = h5const$H5P_DEFAULT )
nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
dataset_access_plThe dataset access property list. See H5P_DATASET_ACCESS.
type_access_plThe datatype access property list.
H5Group$open_by_idx()This function implements the HDF5-API function H5Oopen_by_idx. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.
H5Group$open_by_idx( n, group_name = ".", index_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT )
nThe index of the item to access; zero-based.
group_nameThe name of the group, relative to the object the method is called on.
index_typeThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5Group$ls()Returns the contents of a file or group as a data.frame.
H5Group$ls( recursive = FALSE, detailed = FALSE, index_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_INC, link_access_pl = h5const$H5P_DEFAULT, dataset_access_pl = h5const$H5P_DEFAULT, type_access_pl = h5const$H5P_DEFAULT )
recursiveLogical; should the listing descend into subgroups.
detailedLogical; should a more detailed listing be returned.
index_typeThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
dataset_access_plThe dataset access property list. See H5P_DATASET_ACCESS.
type_access_plThe datatype access property list.
H5Group$exists()This function implements the HDF5-API function H5Lexists. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5Group$exists(name, link_access_pl = h5const$H5P_DEFAULT)
nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5Group$path_valid()This function implements the HDF5-API function H5LTpath_valid. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l_t.html for details.
H5Group$path_valid(path, check_object_valid = TRUE)
pathThe path of the object inside the file.
check_object_validLogical; should the object be checked for validity first.
H5Group$link()This function implements the HDF5-API function H5Olink. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.
H5Group$link( obj, new_link_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT )
objThe HDF5 object to use.
new_link_nameThe new name of the link.
link_create_plThe link creation property list. See H5P_LINK_CREATE.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5Group$obj_copy_to()This function implements the HDF5-API function H5Ocopy. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.
H5Group$obj_copy_to( dst_loc, dst_name, src_name, object_copy_pl = h5const$H5P_DEFAULT, link_create_pl = h5const$H5P_DEFAULT )
dst_locThe destination location; an object of class H5File or H5Group.
dst_nameThe name of the destination object.
src_nameThe name of the source object.
object_copy_plThe object copy property list. See H5P_OBJECT_COPY.
link_create_plThe link creation property list. See H5P_LINK_CREATE.
H5Group$obj_copy_from()This function implements the HDF5-API function H5Ocopy. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.
H5Group$obj_copy_from( src_loc, src_name, dst_name, object_copy_pl = h5const$H5P_DEFAULT, link_create_pl = h5const$H5P_DEFAULT )
src_locsrc_nameThe name of the source object.
dst_nameThe name of the destination object.
object_copy_plThe object copy property list. See H5P_OBJECT_COPY.
link_create_plThe link creation property list. See H5P_LINK_CREATE.
H5Group$group_info()This function implements the HDF5-API function H5Gget_info. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_g.html for details.
H5Group$group_info()
H5Group$group_info_by_name()This function implements the HDF5-API function H5Gget_info_by_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_g.html for details.
H5Group$group_info_by_name(name, link_access_pl = h5const$H5P_DEFAULT)
nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5Group$group_info_by_idx()This function implements the HDF5-API function H5Gget_info_by_idx. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_g.html for details.
H5Group$group_info_by_idx( n, group_name = ".", index_field = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT )
nThe index of the item to access; zero-based.
group_nameThe name of the group, relative to the object the method is called on.
index_fieldThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5Group$create_group()This function implements the HDF5-API function H5Gcreate2 and H5Gcreate_anon (if name is NULL). Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_g.html for regular groups and https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_g.html for anonymous groups for details.
H5Group$create_group( name, link_create_pl = h5const$H5P_DEFAULT, group_create_pl = h5const$H5P_DEFAULT, group_access_pl = h5const$H5P_DEFAULT )
nameThe name of the object, relative to the object the method is called on.
link_create_plThe link creation property list. See H5P_LINK_CREATE.
group_create_plThe group creation property list.
group_access_plThe group access property list.
H5Group$create_dataset()This function is the main interface to create a new dataset. Its parameters allow for customization of the default behavior, 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 at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for regular groups and https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_d.html for anonymous groups for details.
H5Group$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 )
nameThe name of the new dataset. If missing, an anonymous dataset is created
robjAn R-object to take as a template for creating the dataset. Either robj or both dtype and space have to be provided
dtypeThe datatype to use for the creation of the object. Can be null if robj is given.
spaceThe space to use for the object creation. Can be null if robj is given. Otherwise an object of type H5S which specifies the dimensions of the dataset.
dimsDimension of the new dataset; used if space is NULL. overwrite the dimension guessed from robj if robj is given.
chunk_dimsSize 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 in the hdf5r.chunk_size option. See also guess_chunks for a more detailed explanation. If set to NULL, then no chunking is used, unless explicitly set in dataset_create_pl.
gzip_levelOnly if chunk_dims is not null. If given, then the dataset_create_pl is set to enable zipping at the level given here. If set to NULL, then gzip is not set (but could be set otherwise in dataset_create_pl
link_create_plLink creation property list. See H5P_LINK_CREATE
dataset_create_plDataset creation property list. See H5P_DATASET_CREATE
dataset_access_plDataset access property list. See H5P_DATASET_ACCESS
H5Group$commit()This function implements the HDF5-API function H5Tcommit2. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5Group$commit( name, dtype, link_create_pl = h5const$H5P_DEFAULT, type_create_pl = h5const$H5P_DEFAULT, type_access_pl = h5const$H5P_DEFAULT )
nameThe name of the object, relative to the object the method is called on.
dtypeThe datatype to use; an object of class H5T.
link_create_plThe link creation property list. See H5P_LINK_CREATE.
type_create_plThe datatype creation property list.
type_access_plThe datatype access property list.
H5Group$link_create_hard()This function implements the HDF5-API function H5Lcreate_hard. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5Group$link_create_hard( obj_loc, obj_name, link_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT )
obj_locThe location of the object; an object of class H5File or H5Group.
obj_nameThe name of the object, relative to the object the method is called on.
link_nameThe name of the link.
link_create_plThe link creation property list. See H5P_LINK_CREATE.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5Group$link_create_soft()This function implements the HDF5-API function H5Lcreate_soft. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5Group$link_create_soft( target_path, link_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT )
target_pathThe path of the target object.
link_nameThe name of the link.
link_create_plThe link creation property list. See H5P_LINK_CREATE.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5Group$link_create_external()This function implements the HDF5-API function H5Lcreate_external. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5Group$link_create_external( target_filename, target_obj_name, link_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT )
target_filenameThe name of the file that holds the target object.
target_obj_nameThe name of the target object.
link_nameThe name of the link.
link_create_plThe link creation property list. See H5P_LINK_CREATE.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5Group$link_exists()This function implements the HDF5-API function H5Lexists. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5Group$link_exists(name, link_access_pl = h5const$H5P_DEFAULT)
nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5Group$link_move_from()This function implements the HDF5-API function H5Lmove. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5Group$link_move_from( src_loc, src_name, dst_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT )
src_locsrc_nameThe name of the source object.
dst_nameThe name of the destination object.
link_create_plThe link creation property list. See H5P_LINK_CREATE.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5Group$link_move_to()This function implements the HDF5-API function H5Lmove. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5Group$link_move_to( dst_loc, dst_name, src_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT )
dst_locThe destination location; an object of class H5File or H5Group.
dst_nameThe name of the destination object.
src_nameThe name of the source object.
link_create_plThe link creation property list. See H5P_LINK_CREATE.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5Group$link_copy_from()This function implements the HDF5-API function H5Lcopy. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5Group$link_copy_from( src_loc, src_name, dst_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT )
src_locsrc_nameThe name of the source object.
dst_nameThe name of the destination object.
link_create_plThe link creation property list. See H5P_LINK_CREATE.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5Group$link_copy_to()This function implements the HDF5-API function H5Lcopy. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5Group$link_copy_to( dst_loc, dst_name, src_name, link_create_pl = h5const$H5P_DEFAULT, link_access_pl = h5const$H5P_DEFAULT )
dst_locThe destination location; an object of class H5File or H5Group.
dst_nameThe name of the destination object.
src_nameThe name of the source object.
link_create_plThe link creation property list. See H5P_LINK_CREATE.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5Group$link_delete()This function implements the HDF5-API function H5Ldelete. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5Group$link_delete(name, link_access_pl = h5const$H5P_DEFAULT)
nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5Group$link_delete_by_idx()This function implements the HDF5-API function H5Ldelete_by_idx. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5Group$link_delete_by_idx( n, group_name = ".", index_field = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT )
nThe index of the item to access; zero-based.
group_nameThe name of the group, relative to the object the method is called on.
index_fieldThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5Group$link_info()This function implements the HDF5-API function H5Lget_info. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5Group$link_info(name, link_access_pl = h5const$H5P_DEFAULT)
nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5Group$link_info_by_idx()This function implements the HDF5-API function H5Lget_info_by_idx. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5Group$link_info_by_idx( n, group_name = ".", index_field = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT )
nThe index of the item to access; zero-based.
group_nameThe name of the group, relative to the object the method is called on.
index_fieldThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5Group$link_value()This function implements the HDF5-API function H5Lget_val. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5Group$link_value(name, link_access_pl = h5const$H5P_DEFAULT)
nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5Group$link_value_by_idx()This function implements the HDF5-API function H5Lget_val_by_idx. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5Group$link_value_by_idx( n, group_name = ".", index_field = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT )
nThe index of the item to access; zero-based.
group_nameThe name of the group, relative to the object the method is called on.
index_fieldThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5Group$link_name_by_idx()This function implements the HDF5-API function H5Lget_name_by_idx. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_l.html for details.
H5Group$link_name_by_idx( n, group_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT )
nThe index of the item to access; zero-based.
group_nameThe name of the group, relative to the object the method is called on.
idx_typeThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5Group$mount()This function implements the HDF5-API function H5Fmount. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.
H5Group$mount(name, child)
nameThe name of the object, relative to the object the method is called on.
childThe object to mount; an object of class H5File.
H5Group$unmount()This function implements the HDF5-API function H5Funmount. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.
H5Group$unmount(name)
nameThe name of the object, relative to the object the method is called on.
H5Group$get_obj_name()This function implements the HDF5-API function H5Iget_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_i.html for details.
H5Group$get_obj_name()
H5Group$create_attr()This function implements the HDF5-API function H5Acreate2. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5Group$create_attr(attr_name, robj = NULL, dtype = NULL, space = NULL)
H5Group$attr_open()This function implements the HDF5-API function H5Aopen. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5Group$attr_open(attr_name)
attr_nameThe name of the attribute.
H5Group$create_attr_by_name()This function implements the HDF5-API function H5Acreate_by_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5Group$create_attr_by_name( attr_name, obj_name, robj = NULL, dtype = NULL, space = NULL, link_access_pl = h5const$H5P_DEFAULT )
attr_nameThe name of the attribute.
obj_nameThe name of the object, relative to the object the method is called on.
robjAn R object to use as a template for the datatype and dataspace.
dtypeThe datatype to use; an object of class H5T.
spaceThe dataspace to use; an object of class H5S.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5Group$attr_open_by_name()This function implements the HDF5-API function H5Aopen_by_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5Group$attr_open_by_name( attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT )
attr_nameThe name of the attribute.
obj_nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5Group$attr_open_by_idx()This function implements the HDF5-API function H5Aopen_by_idx. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5Group$attr_open_by_idx( n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT )
nThe index of the item to access; zero-based.
obj_nameThe name of the object, relative to the object the method is called on.
idx_typeThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5Group$attr_exists_by_name()This function implements the HDF5-API function H5Aexists_by_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5Group$attr_exists_by_name( attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT )
attr_nameThe name of the attribute.
obj_nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5Group$attr_exists()This function implements the HDF5-API function H5Aexists. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5Group$attr_exists(attr_name)
attr_nameThe name of the attribute.
H5Group$attr_rename_by_name()This function implements the HDF5-API function H5Arename_by_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5Group$attr_rename_by_name( old_attr_name, new_attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT )
old_attr_nameThe current name of the attribute.
new_attr_nameThe new name of the attribute.
obj_nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5Group$attr_rename()This function implements the HDF5-API function H5Arename. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5Group$attr_rename(old_attr_name, new_attr_name)
old_attr_nameThe current name of the attribute.
new_attr_nameThe new name of the attribute.
H5Group$attr_delete()This function implements the HDF5-API function H5Adelete. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5Group$attr_delete(attr_name)
attr_nameThe name of the attribute.
H5Group$attr_delete_by_name()This function implements the HDF5-API function H5Adelete_by_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5Group$attr_delete_by_name( attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT )
attr_nameThe name of the attribute.
obj_nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5Group$attr_delete_by_idx()This function implements the HDF5-API function H5Adelete_by_idx. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5Group$attr_delete_by_idx( n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT )
nThe index of the item to access; zero-based.
obj_nameThe name of the object, relative to the object the method is called on.
idx_typeThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5Group$attr_info_by_name()This function implements the HDF5-API function H5Aget_info_by_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5Group$attr_info_by_name( attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT )
attr_nameThe name of the attribute.
obj_nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5Group$attr_info_by_idx()This function implements the HDF5-API function H5Aget_info_by_idx. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5Group$attr_info_by_idx( n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT )
nThe index of the item to access; zero-based.
obj_nameThe name of the object, relative to the object the method is called on.
idx_typeThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5Group$attr_name_by_idx()This function implements the HDF5-API function H5Aget_name_by_idx. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5Group$attr_name_by_idx( n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT )
nThe index of the item to access; zero-based.
obj_nameThe name of the object, relative to the object the method is called on.
idx_typeThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5Group$attr_get_number()This function implements the HDF5-API function H5Aget_num_attrs. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5Group$attr_get_number()
H5Group$create_reference()This function implements the HDF5-API function H5Rcreate. If space=NULL then a H5R_OBJECT reference is created, otherwise a H5R_DATASET_REGION reference Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_r.html for details.
H5Group$create_reference(name = ".", space = NULL)
nameThe name of the object, relative to the object the method is called on.
spaceThe dataspace to use; an object of class H5S.
H5Group$flush()This function implements the HDF5-API function H5Fflush. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.
H5Group$flush(scope = h5const$H5F_SCOPE_GLOBAL)
scopeThe scope of the flush; one of the H5F_SCOPE_* values in h5const.
H5Group$get_filename()This function implements the HDF5-API function H5Fget_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_f.html for details.
H5Group$get_filename()
H5Group$print()Prints information for the group
H5Group$print(..., max.attributes = 10, max.listing = 10)
...ignored
max.attributesMaximum number of attribute names to print
max.listingMaximum number of ls-items to print
H5Group$obj_info_by_idx()This function implements the HDF5-API function H5Oget_info_by_idx. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.
H5Group$obj_info_by_idx( n, group_name = ".", index_field = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, remove_internal_use_only = TRUE )
nThe index of the item to access; zero-based.
group_nameThe name of the group, relative to the object the method is called on.
index_fieldThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
remove_internal_use_onlyLogical; should fields that are only of internal use be dropped from the result.
H5Group$obj_info_by_name()This function implements the HDF5-API function H5Oget_info_by_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.
H5Group$obj_info_by_name(object_name, remove_internal_use_only = TRUE)
object_nameThe name of the object, relative to the object the method is called on.
remove_internal_use_onlyLogical; should fields that are only of internal use be dropped from the result.
H5Group$obj_info()This function implements the HDF5-API function H5Oget_info. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.
H5Group$obj_info(remove_internal_use_only = TRUE)
remove_internal_use_onlyLogical; should fields that are only of internal use be dropped from the result.
Holger Hoefling
fname <- tempfile(fileext = ".h5") file <- H5File$new(fname, mode = "a") group <- file$create_group("testgroup") group$print() group$close() file$close_all()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
## 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## 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
x |
|
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 class |
dataset_access_pl |
An object of class |
type_access_pl |
Currently always |
value |
Works similar to retrieving objects in a list. x[["my_name"]] retrieves object my_name from the
HDF5-File or HDF5-Group x.
One can also assign objects under a not yet existing name. For either a H5Group or H5D,
a hard link is created. If it is a datatype, H5T, this is committed under the chosen name name.
A H5Group, H5D or H5T, depending on the object saved in the group under
the requested name.
Holger Hoefling
This is the base class for all property lists, but most have a specialized class.
It inherits all functions of the
H5RefClass. It is also the base class for many other classes, specifically
The base class is unlikely to be needed by users - they should use the appropriate subclass required.
Object of class H5P.
H5RefClass -> H5P
H5P$new()Create a new property list; this function itself is unlikely to be needed by users. Users should use the classes of the type they actually require
H5P$new(id = NULL)
idInternal use only
H5P$get_class()This function implements the HDF5-API function H5Pget_class. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P$get_class()
H5P$get_class_name()This function implements the HDF5-API function H5Pget_class_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P$get_class_name()
H5P$copy()This function implements the HDF5-API function H5Pcopy. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P$copy()
H5P$equal()This function implements the HDF5-API function H5Pequal. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P$equal(cmp)
cmpThe object to compare against.
Holger Hoefling
fname <- tempfile(fileext = ".h5") file <- H5File$new(fname, mode = "a") file[["testdataset"]] <- 1:10 p <- file[["testdataset"]]$get_create_plist() p$get_class() p$get_class_name() p$copy() p$equal(p) file$close_all()fname <- tempfile(fileext = ".h5") file <- H5File$new(fname, mode = "a") file[["testdataset"]] <- 1:10 p <- file[["testdataset"]]$get_create_plist() p$get_class() p$get_class_name() p$copy() p$equal(p) file$close_all()
It inherits all functions of the H5P.
Object of class H5P_ATTRIBUTE_CREATE.
H5RefClass -> H5P -> H5P_ATTRIBUTE_CREATE
H5P_ATTRIBUTE_CREATE$new()Create a new class of type H5P_ATTRIBUTE_CREATE
H5P_ATTRIBUTE_CREATE$new(id = NULL)
idInternal use only
H5P_ATTRIBUTE_CREATE$set_char_encoding()This function implements the HDF5-API function H5Pset_char_encoding. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_ATTRIBUTE_CREATE$set_char_encoding(encoding = h5const$H5T_CSET_UTF8)
encodingThe character encoding to use; one of the H5T_CSET_* values in h5const.
H5P_ATTRIBUTE_CREATE$get_char_encoding()This function implements the HDF5-API function H5Pget_char_encoding. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_ATTRIBUTE_CREATE$get_char_encoding()
Holger Hoefling
It inherits all functions of the H5RefClass. The intent of this class is to
provide a mechanism to compare the class of HDF5 property classes. This is mainly intended for internal use
to get the class type of an HDF5 identifier that is known to be a property list, but not of which type.
Object of class H5P_CLASS.
H5RefClass -> H5P_CLASS
H5P_CLASS$equal()This function implements the HDF5-API function H5Pequal. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_CLASS$equal(cmp)
cmpThe object to compare against.
Holger Hoefling
It inherits all functions of the H5P.
Object of class H5P_DATASET_ACCESS.
H5RefClass -> H5P -> H5P_DATASET_ACCESS
H5P_DATASET_ACCESS$new()Creates a new dataset access property list.
H5P_DATASET_ACCESS$new(id = NULL)
idAn HDF5 id; for internal use only.
H5P_DATASET_ACCESS$set_chunk_cache()This function implements the HDF5-API function H5Pset_chunk_cache. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_ACCESS$set_chunk_cache( rdcc_nslots = -1, rdcc_nbytes = -1, rdcc_w0 = -1 )
rdcc_nslotsThe number of slots in the raw data chunk cache. Use -1 for the library default.
rdcc_nbytesThe size of the raw data chunk cache in bytes. Use -1 for the library default.
rdcc_w0The chunk preemption policy, between 0 and 1. Use -1 for the library default.
H5P_DATASET_ACCESS$get_chunk_cache()This function implements the HDF5-API function H5Pget_chunk_cache. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_ACCESS$get_chunk_cache()
Holger Hoefling
It inherits all functions of the H5P.
Object of class H5P_DATASET_CREATE.
H5RefClass -> H5P -> H5P_DATASET_CREATE
H5P_DATASET_CREATE$new()Create a new class of type H5P_DATASET_CREATE
H5P_DATASET_CREATE$new(id = NULL)
idInternal use only
H5P_DATASET_CREATE$set_layout()This function implements the HDF5-API function H5Pset_layout. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_CREATE$set_layout(layout = h5const$H5D_CHUNKED)
layoutThe dataset layout; one of the H5D_* layout values in h5const.
H5P_DATASET_CREATE$get_layout()This function implements the HDF5-API function H5Pget_layout. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_CREATE$get_layout()
H5P_DATASET_CREATE$set_chunk()This function implements the HDF5-API function H5Pset_chunk. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_CREATE$set_chunk(chunk)
chunkThe chunk dimensions.
H5P_DATASET_CREATE$get_chunk()This function implements the HDF5-API function H5Pget_chunk. If the layout is not chunked, returns NA. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_CREATE$get_chunk(max_ndims)
max_ndimsThe maximum number of dimensions to return.
H5P_DATASET_CREATE$set_deflate()This function implements the HDF5-API function H5Pset_deflate. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_CREATE$set_deflate(level)
levelThe compression level, between 0 and 9.
H5P_DATASET_CREATE$set_fill_value()This function implements the HDF5-API function H5Pset_fill_value. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_CREATE$set_fill_value(dtype, value)
dtypeThe datatype to use; an object of class H5T.
valueThe value to assign.
H5P_DATASET_CREATE$get_fill_value()This function implements the HDF5-API function H5Pget_fill_value. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_CREATE$get_fill_value(dtype)
dtypeThe datatype to use; an object of class H5T.
H5P_DATASET_CREATE$set_fill_time()This function implements the HDF5-API function H5Pset_fill_time. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_CREATE$set_fill_time(fill_time = h5const$H5D_FILL_TIME_IFSET)
fill_timeWhen the fill value is written; one of the H5D_FILL_TIME_* values in h5const.
H5P_DATASET_CREATE$get_fill_time()This function implements the HDF5-API function H5Pget_fill_time. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_CREATE$get_fill_time()
H5P_DATASET_CREATE$set_alloc_time()This function implements the HDF5-API function H5Pset_alloc_time. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_CREATE$set_alloc_time(alloc_time = h5const$H5D_ALLOC_TIME_DEFAULT)
alloc_timeWhen storage is allocated; one of the H5D_ALLOC_TIME_* values in h5const.
H5P_DATASET_CREATE$get_alloc_time()This function implements the HDF5-API function H5Pget_alloc_time. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_CREATE$get_alloc_time()
H5P_DATASET_CREATE$set_filter()This function implements the HDF5-API function H5Pset_filter. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_CREATE$set_filter( filter = h5const$H5Z_FILTER_DEFLATE, flags = h5const$H5Z_FLAG_OPTIONAL, cd_values = integer(0) )
H5P_DATASET_CREATE$all_filters_avail()This function implements the HDF5-API function H5Pall_filters_avail. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_CREATE$all_filters_avail()
H5P_DATASET_CREATE$get_nfilters()This function implements the HDF5-API function H5Pget_nfilters. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_CREATE$get_nfilters()
H5P_DATASET_CREATE$get_filter()This function implements the HDF5-API function H5Pget_filter2. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_CREATE$get_filter(idx)
idxThe index of the item to access; zero-based.
H5P_DATASET_CREATE$modify_filter()This function implements the HDF5-API function H5Pmodify_filter. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_CREATE$modify_filter( filter = h5const$H5Z_FILTER_DEFLATE, flags = h5const$H5Z_FLAG_OPTIONAL, cd_values = integer(0) )
H5P_DATASET_CREATE$remove_filter()This function implements the HDF5-API function H5Premove_filter. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_CREATE$remove_filter(filter = h5const$H5Z_FILTER_ALL)
filterThe filter to use; one of the H5Z_FILTER_* values in h5const.
H5P_DATASET_CREATE$set_fletcher32()This function implements the HDF5-API function H5Pset_fletcher32. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_CREATE$set_fletcher32()
H5P_DATASET_CREATE$set_nbit()This function implements the HDF5-API function H5Pset_nbit. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_CREATE$set_nbit()
H5P_DATASET_CREATE$set_scaleoffset()This function implements the HDF5-API function H5Pset_scaleoffset. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_CREATE$set_scaleoffset( scale_type = h5const$H5Z_SO_FLOAT_DSCALE, scale_factor = 0 )
scale_typeThe scale-offset filter type; one of the H5Z_SO_* values in h5const.
scale_factorThe scale factor used by the scale-offset filter.
H5P_DATASET_CREATE$set_shuffle()This function implements the HDF5-API function H5Pset_shuffle. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_CREATE$set_shuffle()
H5P_DATASET_CREATE$set_szip()This function implements the HDF5-API function H5Pset_szip. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_CREATE$set_szip()
H5P_DATASET_CREATE$set_external()This function implements the HDF5-API function H5Pset_external. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_CREATE$set_external(filename, offset, size)
filenameThe name of the file.
offsetThe offset to apply; see the corresponding HDF5 function for how it is interpreted.
sizeThe size of the object in bytes; use Inf for variable-length strings.
H5P_DATASET_CREATE$get_external_count()This function implements the HDF5-API function H5Pget_external_count. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_CREATE$get_external_count()
H5P_DATASET_CREATE$get_external()This function implements the HDF5-API function H5Pget_external. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_CREATE$get_external(idx)
idxThe index of the item to access; zero-based.
Holger Hoefling
It inherits all functions of the H5P.
Object of class H5P_DATASET_XFER.
H5RefClass -> H5P -> H5P_DATASET_XFER
H5P_DATASET_XFER$new()Create a new class of type H5P_DATASET_XFER
H5P_DATASET_XFER$new(id = NULL)
idInternal use only
H5P_DATASET_XFER$set_buffer()This function implements the HDF5-API function H5Pset_buffer. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_XFER$set_buffer(size = 2^20)
sizeThe size of the object in bytes; use Inf for variable-length strings.
H5P_DATASET_XFER$set_edc_check()This function implements the HDF5-API function H5Pset_edc_check. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_XFER$set_edc_check(check = h5const$H5Z_ENABLE_EDC)
checkLogical; should the arguments be checked for validity.
H5P_DATASET_XFER$get_edc_check()This function implements the HDF5-API function H5Pget_edc_check. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_XFER$get_edc_check()
H5P_DATASET_XFER$set_hyper_vector_size()This function implements the HDF5-API function H5Pset_hyper_vector_size. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_XFER$set_hyper_vector_size(size = 2^10)
sizeThe size of the object in bytes; use Inf for variable-length strings.
H5P_DATASET_XFER$get_hyper_vector_size()This function implements the HDF5-API function H5Pget_hyper_vector_size. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_XFER$get_hyper_vector_size()
H5P_DATASET_XFER$set_btree_ratios()This function implements the HDF5-API function H5Pset_btree_ratios. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_XFER$set_btree_ratios(left, middle, right)
leftThe B-tree split ratio for the left-most node.
middleThe B-tree split ratio for interior nodes.
rightThe B-tree split ratio for the right-most node.
H5P_DATASET_XFER$get_btree_ratios()This function implements the HDF5-API function H5Pget_btree_ratios. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_DATASET_XFER$get_btree_ratios()
Holger Hoefling
It inherits all functions of the H5P.
Object of class H5P_FILE_ACCESS.
H5RefClass -> H5P -> H5P_FILE_ACCESS
H5P_FILE_ACCESS$new()Create a new class of type H5P_FILE_ACCESS
H5P_FILE_ACCESS$new(id = NULL)
idInternal use only
H5P_FILE_ACCESS$set_cache()This function implements the HDF5-API function H5Pset_cache. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_FILE_ACCESS$set_cache( rdcc_nslots = 521, rdcc_nbytes = 2^20, rdcc_w0 = 0.75 )
rdcc_nslotsThe number of slots in the raw data chunk cache. Use -1 for the library default.
rdcc_nbytesThe size of the raw data chunk cache in bytes. Use -1 for the library default.
rdcc_w0The chunk preemption policy, between 0 and 1. Use -1 for the library default.
H5P_FILE_ACCESS$get_cache()This function implements the HDF5-API function H5Pget_cache. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_FILE_ACCESS$get_cache()
Holger Hoefling
It inherits all functions of the H5P.
Object of class H5P_FILE_CREATE.
H5RefClass -> H5P -> H5P_FILE_CREATE
H5P_FILE_CREATE$new()Create a new class of type H5P_FILE_CREATE
H5P_FILE_CREATE$new(id = NULL)
idInternal use only
H5P_FILE_CREATE$set_userblock()This function implements the HDF5-API function H5Pset_userblock. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_FILE_CREATE$set_userblock(size)
sizeThe size of the object in bytes; use Inf for variable-length strings.
H5P_FILE_CREATE$get_userblock()This function implements the HDF5-API function H5Pget_userblock. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_FILE_CREATE$get_userblock()
H5P_FILE_CREATE$set_sizes()This function implements the HDF5-API function H5Pset_sizes. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_FILE_CREATE$set_sizes(sizeof_addr, sizeof_size)
sizeof_addrThe size of an address in the file, in bytes.
sizeof_sizeThe size of a size in the file, in bytes.
H5P_FILE_CREATE$get_sizes()This function implements the HDF5-API function H5Pget_sizes. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_FILE_CREATE$get_sizes()
H5P_FILE_CREATE$set_sym_k()This function implements the HDF5-API function H5Pset_sym_k. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_FILE_CREATE$set_sym_k(ik, lk)
ikThe 1/2 rank of the indexed storage or symbol table B-tree.
lkThe 1/2 rank of the symbol table leaf nodes.
H5P_FILE_CREATE$get_sym_k()This function implements the HDF5-API function H5Pget_sym_k. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_FILE_CREATE$get_sym_k()
H5P_FILE_CREATE$set_istore_k()This function implements the HDF5-API function H5Pset_istore_k. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_FILE_CREATE$set_istore_k(ik)
ikThe 1/2 rank of the indexed storage or symbol table B-tree.
H5P_FILE_CREATE$get_istore_k()This function implements the HDF5-API function H5Pget_istore_k. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_FILE_CREATE$get_istore_k()
H5P_FILE_CREATE$set_file_space()This function implements the HDF5-API function H5Pset_file_space. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_FILE_CREATE$set_file_space(strategy, threshold)
strategyThe file space handling strategy; one of the H5F_FSPACE_STRATEGY_* values in h5const.
thresholdThe smallest free-space section to track.
H5P_FILE_CREATE$get_file_space()This function implements the HDF5-API function H5Pget_file_space. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_FILE_CREATE$get_file_space()
Holger Hoefling
It inherits all functions of the H5P.
Object of class H5P_LINK_ACCESS.
H5RefClass -> H5P -> H5P_LINK_ACCESS
H5P_LINK_ACCESS$new()Create a new class of type H5P_LINK_ACCESS
H5P_LINK_ACCESS$new(id = NULL)
idInternal use only
H5P_LINK_ACCESS$set_nlinks()This function implements the HDF5-API function H5Pset_nlinks. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_LINK_ACCESS$set_nlinks(nlinks)
nlinksThe maximum number of soft or external links to traverse.
H5P_LINK_ACCESS$get_nlinks()This function implements the HDF5-API function H5Pget_nlinks. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_LINK_ACCESS$get_nlinks()
H5P_LINK_ACCESS$set_elink_prefix()This function implements the HDF5-API function H5Pset_elink_prefix. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_LINK_ACCESS$set_elink_prefix(elink_prefix)
elink_prefixThe prefix to prepend to external link file names.
H5P_LINK_ACCESS$get_elink_prefix()This function implements the HDF5-API function H5Pget_elink_prefix. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_LINK_ACCESS$get_elink_prefix()
H5P_LINK_ACCESS$set_elink_acc_flags()This function implements the HDF5-API function H5Pset_elink_acc_flags. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_LINK_ACCESS$set_elink_acc_flags(elink_acc_flags = h5const$H5F_ACC_RDWR)
elink_acc_flagsThe file access flags to use when opening external link targets.
H5P_LINK_ACCESS$get_elink_acc_flags()This function implements the HDF5-API function H5Pget_elink_acc_flags. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_LINK_ACCESS$get_elink_acc_flags()
Holger Hoefling
It inherits all functions of the H5P.
Object of class H5P_LINK_CREATE.
H5RefClass -> H5P -> H5P_LINK_CREATE
H5P_LINK_CREATE$new()Create a new class of type H5P_LINK_CREATE
H5P_LINK_CREATE$new(id = NULL)
idInternal use only
H5P_LINK_CREATE$set_char_encoding()This function implements the HDF5-API function H5Pset_char_encoding. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_LINK_CREATE$set_char_encoding(encoding = h5const$H5T_CSET_UTF8)
encodingThe character encoding to use; one of the H5T_CSET_* values in h5const.
H5P_LINK_CREATE$get_char_encoding()This function implements the HDF5-API function H5Pget_char_encoding. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_LINK_CREATE$get_char_encoding()
H5P_LINK_CREATE$set_create_intermediate_group()This function implements the HDF5-API function H5Pset_create_intermediate_group. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_LINK_CREATE$set_create_intermediate_group(create = TRUE)
createLogical; should missing intermediate groups be created.
H5P_LINK_CREATE$get_create_intermediate_group()This function implements the HDF5-API function H5Pget_create_intermediate_group. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_LINK_CREATE$get_create_intermediate_group()
Holger Hoefling
It inherits all functions of the H5P.
Object of class H5P_OBJECT_COPY.
H5RefClass -> H5P -> H5P_OBJECT_COPY
H5P_OBJECT_COPY$new()Create a new class of type H5P_OBJECT_COPY
H5P_OBJECT_COPY$new(id = NULL)
idInternal use only
H5P_OBJECT_COPY$set_copy_obj()This function implements the HDF5-API function H5Pset_copy_object. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_OBJECT_COPY$set_copy_obj(copy_options = 0)
copy_optionsFlags governing how the object is copied.
H5P_OBJECT_COPY$get_copy_obj()This function implements the HDF5-API function H5Pget_copy_object. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_OBJECT_COPY$get_copy_obj()
Holger Hoefling
It inherits all functions of the H5P.
Object of class H5P_OBJECT_CREATE.
H5RefClass -> H5P -> H5P_OBJECT_CREATE
H5P_OBJECT_CREATE$new()Create a new class of type H5P_OBJECT_CREATE
H5P_OBJECT_CREATE$new(id = NULL)
idInternal use only
H5P_OBJECT_CREATE$set_obj_track_times()This function implements the HDF5-API function H5Pset_obj_track_times. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_OBJECT_CREATE$set_obj_track_times(track_times = TRUE)
track_timesLogical; should object times be recorded in the file.
H5P_OBJECT_CREATE$get_obj_track_times()This function implements the HDF5-API function H5Pget_obj_track_times. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_OBJECT_CREATE$get_obj_track_times()
H5P_OBJECT_CREATE$set_attr_phase_change()This function implements the HDF5-API function H5Pset_attr_phase_change. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_OBJECT_CREATE$set_attr_phase_change(max_compact, min_dense)
max_compactThe maximum number of links to store compactly in a group.
min_denseThe minimum number of links before a group switches to dense storage.
H5P_OBJECT_CREATE$get_attr_phase_change()This function implements the HDF5-API function H5Pget_attr_phase_change. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_OBJECT_CREATE$get_attr_phase_change()
H5P_OBJECT_CREATE$set_attr_creation_order()This function implements the HDF5-API function H5Pset_attr_creation_order. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_OBJECT_CREATE$set_attr_creation_order(crt_order_flags = 0)
crt_order_flagsFlags governing whether link creation order is tracked and indexed.
H5P_OBJECT_CREATE$get_attr_creation_order()This function implements the HDF5-API function H5Pget_attr_creation_order. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_p.html for details.
H5P_OBJECT_CREATE$get_attr_creation_order()
Holger Hoefling
H5R is only the common base class and is never used. User should not create objects of this
class by themselves and instead use the create_reference methods of H5D, H5Group or H5File classes.
Sub-classes are H5R_OBJECT and H5R_DATASET_REGION
Object of class H5R.
H5RefClass -> H5R
lengthGet the length of the object
refGet or assign the internal raw-vector representation of the data. Usually, user's shouldn't have to use this.
dimGet or assign the dimensionality of the object
dimnamesGet or assign the dimnames of the object
namesGet or assign the names of the object
rankGet the rank of the object
H5R$subset_read()Method that returns a subset of the data in the H5R-object
H5R$subset_read(dim_index, drop = TRUE)
dim_indexA list of dimension indices as usually pasted into [
dropLogical. Should dimensions of size 1 be dropped.
H5R$subset2_read()Method to read a single item
H5R$subset2_read(i, exact = TRUE)
iThe single item to read
exactIs the item name exact or should partial matching be allowed?
H5R$subset_assign()Assign values into a subset of the H5R-vector
H5R$subset_assign(dim_index, value)
dim_indexA list of dimension indices as usually passed into [
valueThe value to assign
H5R$subset2_assign()Assign a value to a single value in the array
H5R$subset2_assign(i, exact = TRUE, value)
ithe index where to assign the value
exactLogical; does the subscript have to match exactly.
valueThe value to assign
H5R$t()Transpose the object if it is a matrix (i.e. has rank 2
H5R$t()
H5R$clone()The objects of this class are cloneable with this method.
H5R$clone()
Holger Hoefling
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()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()
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 the create_reference methods of H5D, H5Group or H5File classes.
Object of class H5R_DATASET_REGION.
H5RefClass -> H5R -> H5R_DATASET_REGION
H5R_DATASET_REGION$new()Create a new reference for dataset regions; Usually, users shouldn't have to call this, but use the create_reference method of a dataset.
H5R_DATASET_REGION$new(num = 0, id = NULL)
numThe number of items.
idAn HDF5 id; for internal use only.
H5R_DATASET_REGION$dereference()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 components dataset, being an H5D object and space being a H5S object. When setting get_value=TRUE, then instead of these objects The data itself is returned This function implements the HDF5-API function H5Rdereference. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_r.html for details.
H5R_DATASET_REGION$dereference( object_access_pl = h5const$H5P_DEFAULT, obj = NULL, get_value = FALSE )
object_access_plThe object-access property list. Currently always the default
objOverriding the default file the reference is referring to
get_valueLogical; should the referenced values be returned instead of the objects.
Holger Hoefling
H5R objectsVarious functions for H5R objects
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")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")
x |
Object of type |
i |
First dimension |
j |
Second dimension |
... |
Any other dimensions (for subsetting), or objects to concatenate (for |
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 argument names |
row.names |
|
optional |
logical. If |
nm |
The column names to use |
mode |
Only 'any' supported |
width.cutoff |
ignored |
collapse |
ignored |
Check if object inherits from H5R
Check if object inherits from H5R_OBJECT
Check if object inherits from H5R_DATASET_REGION
Returns the names of the elements of the vector
Returns the length of the vector
Array subsetting function
Array subset assignment
Concatenation of H5R vectors
Dimensionality of the object
Assign dimension of the object
Transpose a matrix of H5R objects
Get the dimnames of the object
Set the dimnames of the object
cbind functionality for H5R objects
rbind functionality for H5R objects
Printing of an object of class h5R
Formatting of an H5R object
Coerce an H5R object to a data.frame
Coerce to a vector
Coerces the object to a data.frame
Coerces to a vector
Depending on the function
Holger Hoefling
H5R_OBJECT is the reference class for objects. Users should not create this class by themselves, but use the appropriate
and instead use the create_reference methods of H5D, H5Group or H5File classes.
Object of class H5R_OBJECT.
H5RefClass -> H5R -> H5R_OBJECT
H5R_OBJECT$new()Create a new reference for object; Usually, users shouldn't have to call this, but use the create_reference method of a dataset, group of committed datatype
H5R_OBJECT$new(num = 0, id = NULL)
numThe number of items.
idAn HDF5 id; for internal use only.
H5R_OBJECT$dereference()Dereference an H5R reference. The file the reference is pointing to is assigned automatically This function implements the HDF5-API function H5Rdereference. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_r.html for details.
H5R_OBJECT$dereference(object_access_pl = h5const$H5P_DEFAULT, obj = NULL)
object_access_plThe object-access property list. Currently always the default
objOverriding the default file the reference is referring to
Holger Hoefling
This class is not intended for creating objects, but as a base class for all other H5-derived classes to provide common functionality for id tracking
Object of reference class H5RefClass.
idReturns the id of the object
id_envThe environment that holds the id, used internally for reference counting.
is_validThis function implements the HDF5-API function H5Iis_valid. Please see the documentation at https://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 this case, the class id is set to NA and is_valid returns FALSE.
messageLegacy function; currently not used; may be removed
H5RefClass$get_file_id()This function implements the HDF5-API function H5Iget_file_id. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_i.html for details.
H5RefClass$get_file_id()
H5RefClass$get_obj_type()This function implements the HDF5-API function H5Iget_type. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_i.html for details.
H5RefClass$get_obj_type()
H5RefClass$get_ref()This function implements the HDF5-API function H5Iget_ref. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_i.html for details.
H5RefClass$get_ref()
H5RefClass$inc_ref()This function implements the HDF5-API function H5Iinc_ref. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_i.html for details.
H5RefClass$inc_ref()
H5RefClass$dec_ref()This function implements the HDF5-API function H5Idec_ref. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_i.html for details.
H5RefClass$dec_ref()
H5RefClass$new()Constructor for the basic class for hdf5 objects. Takes an id and stores it appropriately, including the necessary counting of object references that the package implements. This reference counting is included in addition to R's internal method in order to allow for the invalidation of objects in R itself when all open handles in an R-file are being closed.
H5RefClass$new(id = NULL)
idAn HDF5 id; for internal use only.
H5RefClass$close()Closes an object and calls the appropriate HDF5 function for the type of object
H5RefClass$close()
H5RefClass$print()Prints the class of the object and the id
H5RefClass$print(...)
...Further arguments; currently ignored.
H5RefClass$methods()Prints available methods on the screen
H5RefClass$methods()
Holger Hoefling
This class represents Spaces in HDF5. These are mostly useful to define the
dimensions of a dataset as well as the maximum dimensions to which it can grow. By default, the
maximum dimension is equal to the initial dimension. If you want the array to be able to grow arbitrarily
large in one dimension, set the maximum dimension for this index to Inf. See the examples below
for code how to do this.
Object of class H5S.
H5RefClass -> H5S
dimsGet 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
maxdimsGet 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
rankThe rank, i.e. the number of dimensions, of the space.
H5S$new()Create a new HDF5-space. This can be done by either specifying a space with appropriate dimensions or by decoding a character string that represents an encoded space
H5S$new(
type = c("simple", "scalar", "null"),
dims = NULL,
maxdims = dims,
decode_buf = NULL,
id = NULL
)
typeEither a simple space, for which dims and maxdims have to be given or a scalar or null space. See the HDF5 user guide on spaces to explain the differences.
dimsThe dimension of the space in case it is of type simple
maxdimsThe maximal dimensions of the space
decode_bufThe character string that holds the encoded representation of a space
idAn existing HDF5 id; internal use only
H5S$copy()This function implements the HDF5-API function H5Scopy. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.
H5S$copy()
H5S$encode()This function implements the HDF5-API function H5Sencode. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.
H5S$encode()
H5S$is_simple()This function implements the HDF5-API function H5Sis_simple. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.
H5S$is_simple()
H5S$get_simple_extent_ndims()This function implements the HDF5-API function H5Sget_simple_extent_ndims. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.
H5S$get_simple_extent_ndims()
H5S$offset_simple()This function implements the HDF5-API function H5Soffset_simple. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.
H5S$offset_simple(offset)
offsetThe offset to apply; see the corresponding HDF5 function for how it is interpreted.
H5S$get_simple_extent_dims()This function implements the HDF5-API function H5Sget_simple_extent_dims. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.
H5S$get_simple_extent_dims()
H5S$get_simple_extent_npoints()This function implements the HDF5-API function H5Sget_simple_extent_npoints. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.
H5S$get_simple_extent_npoints()
H5S$get_simple_extent_type()This function implements the HDF5-API function H5Sget_simple_extent_type. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.
H5S$get_simple_extent_type()
H5S$extent_copy()This function implements the HDF5-API function H5Sextent_copy. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.
H5S$extent_copy(h5s_source)
h5s_sourceThe dataspace to copy the extent from; an object of class H5S.
H5S$extent_equal()This function implements the HDF5-API function H5Sextent_equal. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.
H5S$extent_equal(h5s_cmp)
h5s_cmpThe dataspace to compare the extent against; an object of class H5S.
H5S$set_extent_simple()This function implements the HDF5-API function H5Sset_extent_simple. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.
H5S$set_extent_simple(dims, maxdims)
dimsThe dimensions of the object.
maxdimsThe maximum dimensions of the dataspace; use Inf for unlimited.
H5S$set_extent_none()This function implements the HDF5-API function H5Sset_extent_none. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.
H5S$set_extent_none()
H5S$get_select_type()This function implements the HDF5-API function H5Sget_select_type. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.
H5S$get_select_type()
H5S$get_select_npoints()This function implements the HDF5-API function H5Sget_select_npoints. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.
H5S$get_select_npoints()
H5S$get_select_hyper_nblocks()This function implements the HDF5-API function H5Sget_select_hyper_nblocks. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.
H5S$get_select_hyper_nblocks()
H5S$get_select_hyper_blocklist()This function implements the HDF5-API function H5Sget_select_hyper_blocklist. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.
H5S$get_select_hyper_blocklist( startblock = 0, numblocks = (self$get_select_hyper_nblocks() - startblock) )
startblockThe first block to return; zero-based.
numblocksThe number of blocks to return.
H5S$get_select_elem_npoints()This function implements the HDF5-API function H5Sget_select_elem_npoints. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.
H5S$get_select_elem_npoints()
H5S$get_select_elem_pointlist()This function implements the HDF5-API function H5Sget_select_elem_pointlist. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.
H5S$get_select_elem_pointlist( startpoint = 0, numpoints = (self$get_select_elem_npoints() - startpoint) )
startpointThe first point to return; zero-based.
numpointsThe number of points to return.
H5S$get_select_bounds()This function implements the HDF5-API function H5Sget_select_bounds. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.
H5S$get_select_bounds()
H5S$select_all()This function implements the HDF5-API function H5Sselect_all. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.
H5S$select_all()
H5S$select_none()This function implements the HDF5-API function H5Sselect_none. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.
H5S$select_none()
H5S$select_valid()This function implements the HDF5-API function H5Sselect_valid. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.
H5S$select_valid()
H5S$select_elements()This function implements the HDF5-API function H5Sselect_elements. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.
H5S$select_elements(coord, op = h5const$H5S_SELECT_SET, byrow = TRUE)
coordThe coordinates of the elements to select.
opThe selection operator to apply; one of the H5S_SELECT_* values in h5const.
byrowLogical; are the coordinates given row-wise.
H5S$select_hyperslab()This function implements the HDF5-API function H5Sselect_hyperslab. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_s.html for details.
H5S$select_hyperslab( start, count, stride = NULL, block = NULL, op = h5const$H5S_SELECT_SET )
startThe offset at which the hyperslab starts, one value per dimension.
countThe number of blocks to select, one value per dimension.
strideThe distance between successive blocks, one value per dimension.
blockThe size of each block, one value per dimension.
opThe selection operator to apply; one of the H5S_SELECT_* values in h5const.
H5S$subset()Subsetting the space. This is mainly intended as a helper function for the '[' function, but can also be used on its own.
H5S$subset(args, op = h5const$H5S_SELECT_SET, envir = parent.frame())
argsThe 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.
opThe operator to use. Same as for the other HDF5 space selection functions. One of the elements shown in h5const$H5S_seloper_t
envirThe environment in which to evaluate args
H5S$print()Prints information for the group
H5S$print(...)
...ignored
Holger Hoefling
h5s_fixed <- H5S$new("simple", dims=c(5, 2)) h5s_fixed h5s_variable <- H5S$new("simple", dims=c(5,2), maxdims=c(Inf,2)) h5s_variable h5s_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 selection h5s_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()h5s_fixed <- H5S$new("simple", dims=c(5, 2)) h5s_fixed h5s_variable <- H5S$new("simple", dims=c(5,2), maxdims=c(Inf,2)) h5s_variable h5s_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 selection h5s_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()
Selecting and assigning subsets of HDF5-Spaces and HDF5-Datasets
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()] <- valuesubset_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
x |
|
d1 |
First dimension of the object |
... |
Used for other dimension of the object |
op |
Operation to perform on the |
envir |
The environment in which the dimension indices |
dataset_xfer_pl |
An object of class |
flags |
Some flags governing edge cases of conversion from HDF5 to R. This is related to how integers are being treated and
the 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 of |
drop |
Logical. When reading data, should dimensions of size 1 be dropped. |
value |
The value to assign to the dataset |
Used for subsetting HDF5-Datasets or HDF5-Spaces or for assigning data into HDF5-Datasets. There are some differences to consider 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-frame
is needed, not just a subset of the columns.
Another important differences is for datasets of HDF5-ARRAY type H5T_ARRAY
where the access to the object is only for the dimension of the object itself, not including the dimensions of the underlying array type.
For x being a H5S, the same object is returned, but with the selection set as requested. For
H5D it retrieves the subset of data requested or sets the subset of data assigned, as for any n-dimensional array
in R.
Holger Hoefling
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 the
H5RefClass. It is also the base class for many other classes well, specifically
H5T_BITFIELD (currently identical to the integer class)
Object of class H5T.
H5RefClass -> H5T
H5T$get_obj_name()This function implements the HDF5-API function H5Iget_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_i.html for details.
H5T$get_obj_name()
H5T$create_attr()This function implements the HDF5-API function H5Acreate2. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5T$create_attr(attr_name, robj = NULL, dtype = NULL, space = NULL)
H5T$attr_open()This function implements the HDF5-API function H5Aopen. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5T$attr_open(attr_name)
attr_nameThe name of the attribute.
H5T$create_attr_by_name()This function implements the HDF5-API function H5Acreate_by_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5T$create_attr_by_name( attr_name, obj_name, robj = NULL, dtype = NULL, space = NULL, link_access_pl = h5const$H5P_DEFAULT )
attr_nameThe name of the attribute.
obj_nameThe name of the object, relative to the object the method is called on.
robjAn R object to use as a template for the datatype and dataspace.
dtypeThe datatype to use; an object of class H5T.
spaceThe dataspace to use; an object of class H5S.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5T$attr_open_by_name()This function implements the HDF5-API function H5Aopen_by_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5T$attr_open_by_name( attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT )
attr_nameThe name of the attribute.
obj_nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5T$attr_open_by_idx()This function implements the HDF5-API function H5Aopen_by_idx. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5T$attr_open_by_idx( n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT )
nThe index of the item to access; zero-based.
obj_nameThe name of the object, relative to the object the method is called on.
idx_typeThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5T$attr_exists_by_name()This function implements the HDF5-API function H5Aexists_by_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5T$attr_exists_by_name( attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT )
attr_nameThe name of the attribute.
obj_nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5T$attr_exists()This function implements the HDF5-API function H5Aexists. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5T$attr_exists(attr_name)
attr_nameThe name of the attribute.
H5T$attr_rename_by_name()This function implements the HDF5-API function H5Arename_by_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5T$attr_rename_by_name( old_attr_name, new_attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT )
old_attr_nameThe current name of the attribute.
new_attr_nameThe new name of the attribute.
obj_nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5T$attr_rename()This function implements the HDF5-API function H5Arename. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5T$attr_rename(old_attr_name, new_attr_name)
old_attr_nameThe current name of the attribute.
new_attr_nameThe new name of the attribute.
H5T$attr_delete()This function implements the HDF5-API function H5Adelete. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5T$attr_delete(attr_name)
attr_nameThe name of the attribute.
H5T$attr_delete_by_name()This function implements the HDF5-API function H5Adelete_by_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5T$attr_delete_by_name( attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT )
attr_nameThe name of the attribute.
obj_nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5T$attr_delete_by_idx()This function implements the HDF5-API function H5Adelete_by_idx. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5T$attr_delete_by_idx( n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT )
nThe index of the item to access; zero-based.
obj_nameThe name of the object, relative to the object the method is called on.
idx_typeThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5T$attr_info_by_name()This function implements the HDF5-API function H5Aget_info_by_name. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5T$attr_info_by_name( attr_name, obj_name, link_access_pl = h5const$H5P_DEFAULT )
attr_nameThe name of the attribute.
obj_nameThe name of the object, relative to the object the method is called on.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5T$attr_info_by_idx()This function implements the HDF5-API function H5Aget_info_by_idx. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5T$attr_info_by_idx( n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT )
nThe index of the item to access; zero-based.
obj_nameThe name of the object, relative to the object the method is called on.
idx_typeThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5T$attr_name_by_idx()This function implements the HDF5-API function H5Aget_name_by_idx. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5T$attr_name_by_idx( n, obj_name, idx_type = h5const$H5_INDEX_NAME, order = h5const$H5_ITER_NATIVE, link_access_pl = h5const$H5P_DEFAULT )
nThe index of the item to access; zero-based.
obj_nameThe name of the object, relative to the object the method is called on.
idx_typeThe index to iterate over; one of the H5_INDEX_* values in h5const.
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
link_access_plThe link access property list. See H5P_LINK_ACCESS.
H5T$attr_get_number()This function implements the HDF5-API function H5Aget_num_attrs. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_a.html for details.
H5T$attr_get_number()
H5T$create_reference()This function implements the HDF5-API function H5Rcreate. If space=NULL then a H5R_OBJECT reference is created, otherwise a H5R_DATASET_REGION reference Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_r.html for details.
H5T$create_reference(name = ".", space = NULL)
nameThe name of the object, relative to the object the method is called on.
spaceThe dataspace to use; an object of class H5S.
H5T$new()Internal use only
H5T$new(id)
idAn HDF5 id; for internal use only.
H5T$get_class()This function implements the HDF5-API function H5Tget_class. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T$get_class()
H5T$get_size()This function implements the HDF5-API function H5Tget_size. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T$get_size(...)
...ignored
H5T$set_size()This function implements the HDF5-API function H5Tset_size. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T$set_size(size)
sizeThe size of the object in bytes; use Inf for variable-length strings.
H5T$set_precision()This function implements the HDF5-API function H5Tset_precision. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T$set_precision(precision)
precisionThe precision of the datatype, in bits.
H5T$get_precision()This function implements the HDF5-API function H5Tget_precision. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T$get_precision()
H5T$set_order()This function implements the HDF5-API function H5Tset_order. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T$set_order(order)
orderThe order in which to iterate; one of the H5_ITER_* values in h5const.
H5T$get_order()This function implements the HDF5-API function H5Tget_order. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T$get_order()
H5T$set_offset()This function implements the HDF5-API function H5Tset_offset. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T$set_offset(offset)
offsetThe offset to apply; see the corresponding HDF5 function for how it is interpreted.
H5T$get_offset()This function implements the HDF5-API function H5Tget_offset. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T$get_offset()
H5T$set_pad()This function implements the HDF5-API function H5Tset_pad. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T$set_pad(pad)
padThe padding to use for unused bits; one of the H5T_PAD_* values in h5const.
H5T$get_pad()This function implements the HDF5-API function H5Tget_pad. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T$get_pad()
H5T$copy()This function implements the HDF5-API function H5Tcopy. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T$copy()
H5T$is_committed()This function implements the HDF5-API function H5Tcommitted. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T$is_committed()
H5T$equal()This function implements the HDF5-API function H5Tequal. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T$equal(dtype)
dtypeThe datatype to use; an object of class H5T.
H5T$is_vlen()This function detects if the underlying type is H5T_VLEN or a variable length string. This is used to know if after reading a dataset, memory has to be freed
H5T$is_vlen()
H5T$detect_class()This function implements the HDF5-API function H5Tdetect_class. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T$detect_class(dtype_class)
dtype_classThe datatype class to look for; one of the H5T_* class values in h5const.
H5T$get_native_type()This function implements the HDF5-API function H5Tget_native_type. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T$get_native_type(direction = h5const$H5T_DIR_ASCEND)
directionThe direction in which to search for a native type; one of the H5T_DIR_* values in h5const.
H5T$get_create_plist()This function implements the HDF5-API function H5Tget_create_plist. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T$get_create_plist()
H5T$to_text()This function implements the HDF5-API function H5LTdtype_to_text.
H5T$to_text(lang_type = h5const$H5LT_DDL)
lang_typeThe language to produce the text representation in; one of the H5LT_LANG_* values in h5const.
H5T$print()Prints information for the group
H5T$print(...)
...ignored
H5T$obj_info()This function implements the HDF5-API function H5Oget_info. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_o.html for details.
H5T$obj_info(remove_internal_use_only = TRUE)
remove_internal_use_onlyLogical; should fields that are only of internal use be dropped from the result.
Holger Hoefling
my_int <- h5types$H5T_NATIVE_INT my_int$to_text() my_int$get_size() # Show how to commit a datatype fname <- 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 attributes h5attr(my_int, "test") <- "A string" h5attributes(my_int) file$close_all() file.remove(fname)my_int <- h5types$H5T_NATIVE_INT my_int$to_text() my_int$get_size() # Show how to commit a datatype fname <- 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 attributes h5attr(my_int, "test") <- "A string" h5attributes(my_int) file$close_all() file.remove(fname)
Inherits from class H5T. This class represents an array. As datasets in HDF5
are itself already arrays, this datatype is not needed there. It is mostly useful when a column in a
H5T_COMPUND object is intended to be an array. This however makes it difficult to work
with such objects in R - as a column of the corresponding data.frame has to be an array. So please
use with care.
Object of class H5T_ARRAY.
H5RefClass -> H5T -> H5T_ARRAY
H5RefClass$close()H5RefClass$dec_ref()H5RefClass$get_file_id()H5RefClass$get_obj_type()H5RefClass$get_ref()H5RefClass$inc_ref()H5RefClass$methods()H5T$attr_delete()H5T$attr_delete_by_idx()H5T$attr_delete_by_name()H5T$attr_exists()H5T$attr_exists_by_name()H5T$attr_get_number()H5T$attr_info_by_idx()H5T$attr_info_by_name()H5T$attr_name_by_idx()H5T$attr_open()H5T$attr_open_by_idx()H5T$attr_open_by_name()H5T$attr_rename()H5T$attr_rename_by_name()H5T$copy()H5T$create_attr()H5T$create_attr_by_name()H5T$create_reference()H5T$detect_class()H5T$equal()H5T$get_class()H5T$get_create_plist()H5T$get_native_type()H5T$get_obj_name()H5T$get_offset()H5T$get_order()H5T$get_pad()H5T$get_precision()H5T$get_size()H5T$is_committed()H5T$is_vlen()H5T$obj_info()H5T$print()H5T$set_offset()H5T$set_order()H5T$set_pad()H5T$set_precision()H5T$set_size()H5T$to_text()H5T_ARRAY$new()Create an array datatype.
H5T_ARRAY$new(dims, dtype_base, id = NULL)
dimsThe dimension of the datatype
dtype_baseThe datatype that makes up the elements of the array
idinternal use only
H5T_ARRAY$get_array_ndims()This function implements the HDF5-API function H5Tget_array_ndims. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T_ARRAY$get_array_ndims()
H5T_ARRAY$get_array_dims()This function implements the HDF5-API function H5Tget_array_dims2. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T_ARRAY$get_array_dims()
H5T_ARRAY$get_super()This function implements the HDF5-API function H5Tget_super. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T_ARRAY$get_super()
H5T_ARRAY$describe()Print a detailed description of the datatype; this is experimental
H5T_ARRAY$describe()
Holger Hoefling
In HDF5, complex numbers don't actually exist. They are represented as H5T_COMPOUND with two columns named Real and
Imaginary.
Inherits from class H5T_COMPOUND.
Object of class H5T_COMPLEX.
H5RefClass -> H5T -> H5T_COMPOUND -> H5T_COMPLEX
H5RefClass$close()H5RefClass$dec_ref()H5RefClass$get_file_id()H5RefClass$get_obj_type()H5RefClass$get_ref()H5RefClass$inc_ref()H5RefClass$methods()H5T$attr_delete()H5T$attr_delete_by_idx()H5T$attr_delete_by_name()H5T$attr_exists()H5T$attr_exists_by_name()H5T$attr_get_number()H5T$attr_info_by_idx()H5T$attr_info_by_name()H5T$attr_name_by_idx()H5T$attr_open()H5T$attr_open_by_idx()H5T$attr_open_by_name()H5T$attr_rename()H5T$attr_rename_by_name()H5T$copy()H5T$create_attr()H5T$create_attr_by_name()H5T$create_reference()H5T$detect_class()H5T$equal()H5T$get_class()H5T$get_create_plist()H5T$get_native_type()H5T$get_obj_name()H5T$get_offset()H5T$get_order()H5T$get_pad()H5T$get_precision()H5T$get_size()H5T$is_committed()H5T$is_vlen()H5T$obj_info()H5T$print()H5T$set_offset()H5T$set_order()H5T$set_pad()H5T$set_precision()H5T$set_size()H5T$to_text()H5T_COMPOUND$describe()H5T_COMPOUND$get_cpd_classes()H5T_COMPOUND$get_cpd_labels()H5T_COMPOUND$get_cpd_offsets()H5T_COMPOUND$get_cpd_types()H5T_COMPOUND$pack()H5T_COMPLEX$new()Create a new complex datatype
H5T_COMPLEX$new(id = NULL)
idInternal use only
Holger Hoefling
Inherits from class H5T.
Object of class H5T_COMPOUND.
H5RefClass -> H5T -> H5T_COMPOUND
H5RefClass$close()H5RefClass$dec_ref()H5RefClass$get_file_id()H5RefClass$get_obj_type()H5RefClass$get_ref()H5RefClass$inc_ref()H5RefClass$methods()H5T$attr_delete()H5T$attr_delete_by_idx()H5T$attr_delete_by_name()H5T$attr_exists()H5T$attr_exists_by_name()H5T$attr_get_number()H5T$attr_info_by_idx()H5T$attr_info_by_name()H5T$attr_name_by_idx()H5T$attr_open()H5T$attr_open_by_idx()H5T$attr_open_by_name()H5T$attr_rename()H5T$attr_rename_by_name()H5T$copy()H5T$create_attr()H5T$create_attr_by_name()H5T$create_reference()H5T$detect_class()H5T$equal()H5T$get_class()H5T$get_create_plist()H5T$get_native_type()H5T$get_obj_name()H5T$get_offset()H5T$get_order()H5T$get_pad()H5T$get_precision()H5T$get_size()H5T$is_committed()H5T$is_vlen()H5T$obj_info()H5T$print()H5T$set_offset()H5T$set_order()H5T$set_pad()H5T$set_precision()H5T$set_size()H5T$to_text()H5T_COMPOUND$new()Create at compound type that is the HDF5 equivalent of a table
H5T_COMPOUND$new(labels, dtypes, size = NULL, offset = NULL, id = NULL)
labelsThe labels of the columns of the compound object
dtypesThe datatypes of the columns of the object; this is usually a list of objects of class H5T
sizeThe size of each datatype; if NULL, automatically inferred
offsetThe offset where each datatype starts; can be different from the sum of the individual sizes so that datatypes are aligned with memory addresses. If NULL, inferred automatically
idInternal use only
H5T_COMPOUND$pack()This function implements the HDF5-API function H5Tpack. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T_COMPOUND$pack()
H5T_COMPOUND$get_cpd_types()Return H5T objects that represent the datatypes of the columns of the compound object. Returned as a list if more than 1
H5T_COMPOUND$get_cpd_types()
H5T_COMPOUND$get_cpd_labels()Return the labels of the columns as a character vector
H5T_COMPOUND$get_cpd_labels()
H5T_COMPOUND$get_cpd_classes()Return the classes of the columns as an object of type factor_ext
H5T_COMPOUND$get_cpd_classes()
H5T_COMPOUND$get_cpd_offsets()Return the offsets of the datatypes
H5T_COMPOUND$get_cpd_offsets()
H5T_COMPOUND$describe()Print a detailed description of the datatype; this is experimental
H5T_COMPOUND$describe()
Holger Hoefling
# create a H5T_COMPOUND corresponding to a data-frame my_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# create a H5T_COMPOUND corresponding to a data-frame my_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
Inherits from class H5T.
Object of class H5T_ENUM.
H5RefClass -> H5T -> H5T_INTEGER -> H5T_ENUM
H5RefClass$close()H5RefClass$dec_ref()H5RefClass$get_file_id()H5RefClass$get_obj_type()H5RefClass$get_ref()H5RefClass$inc_ref()H5RefClass$methods()H5T$attr_delete()H5T$attr_delete_by_idx()H5T$attr_delete_by_name()H5T$attr_exists()H5T$attr_exists_by_name()H5T$attr_get_number()H5T$attr_info_by_idx()H5T$attr_info_by_name()H5T$attr_name_by_idx()H5T$attr_open()H5T$attr_open_by_idx()H5T$attr_open_by_name()H5T$attr_rename()H5T$attr_rename_by_name()H5T$copy()H5T$create_attr()H5T$create_attr_by_name()H5T$create_reference()H5T$detect_class()H5T$equal()H5T$get_class()H5T$get_create_plist()H5T$get_native_type()H5T$get_obj_name()H5T$get_offset()H5T$get_order()H5T$get_pad()H5T$get_precision()H5T$get_size()H5T$is_committed()H5T$is_vlen()H5T$obj_info()H5T$print()H5T$set_offset()H5T$set_order()H5T$set_pad()H5T$set_precision()H5T$to_text()H5T_INTEGER$get_sign()H5T_INTEGER$set_sign()H5T_ENUM$new()Create an enumeration datatype. This is either a factor-like object or a logical variable (that is internally represented as an ENUM-type.
H5T_ENUM$new(labels, values = seq_along(labels), id = NULL)
labelsThe labels of the ENUM-type
valuesThe values corresponding to the labels
idInternal use only
H5T_ENUM$get_labels()Return all the labels of the enumeration type
H5T_ENUM$get_labels()
H5T_ENUM$get_values()Return the values of the enumeration type
H5T_ENUM$get_values()
H5T_ENUM$set_size()Base type of every enum is H5T_INTEGER. This disables the set_size function
H5T_ENUM$set_size(size)
sizeThe size of the object in bytes; use Inf for variable-length strings.
H5T_ENUM$get_super()Returns H5T_INTEGER that is the base type of the enumeration
H5T_ENUM$get_super()
H5T_ENUM$describe()Print a detailed description of the datatype; this is experimental
H5T_ENUM$describe()
Holger Hoefling
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 optimally nucleotide_enum$get_size() nucleotide_enum$get_precision()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 optimally nucleotide_enum$get_size() nucleotide_enum$get_precision()
Inherits from class H5T. Users should not create float types with this class, but instead
use e.g. h5types$H5T_NATIVE_DOUBLE. Using the functions of this class, many aspects of the representation of the
floating point number can then be manipulated.
Object of class H5T_FLOAT.
H5RefClass -> H5T -> H5T_FLOAT
H5RefClass$close()H5RefClass$dec_ref()H5RefClass$get_file_id()H5RefClass$get_obj_type()H5RefClass$get_ref()H5RefClass$inc_ref()H5RefClass$methods()H5T$attr_delete()H5T$attr_delete_by_idx()H5T$attr_delete_by_name()H5T$attr_exists()H5T$attr_exists_by_name()H5T$attr_get_number()H5T$attr_info_by_idx()H5T$attr_info_by_name()H5T$attr_name_by_idx()H5T$attr_open()H5T$attr_open_by_idx()H5T$attr_open_by_name()H5T$attr_rename()H5T$attr_rename_by_name()H5T$copy()H5T$create_attr()H5T$create_attr_by_name()H5T$create_reference()H5T$detect_class()H5T$equal()H5T$get_class()H5T$get_create_plist()H5T$get_native_type()H5T$get_obj_name()H5T$get_offset()H5T$get_order()H5T$get_pad()H5T$get_precision()H5T$get_size()H5T$initialize()H5T$is_committed()H5T$is_vlen()H5T$obj_info()H5T$print()H5T$set_offset()H5T$set_order()H5T$set_pad()H5T$set_precision()H5T$set_size()H5T$to_text()H5T_FLOAT$set_fields()This function implements the HDF5-API function H5Tset_fields. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T_FLOAT$set_fields(spos, epos, esize, mpos, msize)
sposThe bit position of the sign bit.
eposThe bit position of the exponent field.
esizeThe size of the exponent field, in bits.
mposThe bit position of the mantissa field.
msizeThe size of the mantissa field, in bits.
H5T_FLOAT$get_fields()This function implements the HDF5-API function H5Tget_fields. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T_FLOAT$get_fields()
H5T_FLOAT$set_ebias()This function implements the HDF5-API function H5Tset_ebias. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T_FLOAT$set_ebias(ebias)
ebiasThe exponent bias.
H5T_FLOAT$get_ebias()This function implements the HDF5-API function H5Tget_ebias. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T_FLOAT$get_ebias()
H5T_FLOAT$set_norm()This function implements the HDF5-API function H5Tset_norm. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T_FLOAT$set_norm(norm)
normThe mantissa normalisation; one of the H5T_NORM_* values in h5const.
H5T_FLOAT$get_norm()This function implements the HDF5-API function H5Tget_norm. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T_FLOAT$get_norm()
H5T_FLOAT$set_inpad()This function implements the HDF5-API function H5Tset_inpad. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T_FLOAT$set_inpad(inpad)
inpadHow to fill unused internal bits; one of the H5T_PAD_* values in h5const.
H5T_FLOAT$get_inpad()This function implements the HDF5-API function H5Tget_inpad. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T_FLOAT$get_inpad()
H5T_FLOAT$describe()Print a detailed description of the datatype; this is experimental
H5T_FLOAT$describe()
Holger Hoefling
Inherits from class H5T.
Users should not create integer datatypes themselves using this class. Instead, integer should be derived
from one of the base-types such as h5types$H5T_NATIVE_INT (which internally automatically creates a copy of the type).
For a complete list of types see h5types$overview.
Object of class H5T_INTEGER.
H5RefClass -> H5T -> H5T_INTEGER
H5RefClass$close()H5RefClass$dec_ref()H5RefClass$get_file_id()H5RefClass$get_obj_type()H5RefClass$get_ref()H5RefClass$inc_ref()H5RefClass$methods()H5T$attr_delete()H5T$attr_delete_by_idx()H5T$attr_delete_by_name()H5T$attr_exists()H5T$attr_exists_by_name()H5T$attr_get_number()H5T$attr_info_by_idx()H5T$attr_info_by_name()H5T$attr_name_by_idx()H5T$attr_open()H5T$attr_open_by_idx()H5T$attr_open_by_name()H5T$attr_rename()H5T$attr_rename_by_name()H5T$copy()H5T$create_attr()H5T$create_attr_by_name()H5T$create_reference()H5T$detect_class()H5T$equal()H5T$get_class()H5T$get_create_plist()H5T$get_native_type()H5T$get_obj_name()H5T$get_offset()H5T$get_order()H5T$get_pad()H5T$get_precision()H5T$get_size()H5T$initialize()H5T$is_committed()H5T$is_vlen()H5T$obj_info()H5T$print()H5T$set_offset()H5T$set_order()H5T$set_pad()H5T$set_precision()H5T$set_size()H5T$to_text()H5T_INTEGER$set_sign()This function implements the HDF5-API function H5Tset_sign. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T_INTEGER$set_sign(sign)
signThe signedness of the integer; one of the H5T_SGN_* values in h5const.
H5T_INTEGER$get_sign()This function implements the HDF5-API function H5Tget_sign. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T_INTEGER$get_sign()
H5T_INTEGER$describe()Return a vector that describes the key features of the datatype
H5T_INTEGER$describe()
Holger Hoefling
my_int <- h5types$H5T_NATIVE_INT # make an int with 2 bit my_int$set_sign(h5const$H5T_SGN_NONE) my_int$set_size(1) my_int$set_precision(2) my_int$describe()my_int <- h5types$H5T_NATIVE_INT # make an int with 2 bit my_int$set_sign(h5const$H5T_SGN_NONE) my_int$set_size(1) my_int$set_precision(2) my_int$describe()
Inherits from class H5T.
Object of class H5T_LOGICAL.
H5RefClass -> H5T -> H5T_INTEGER -> H5T_ENUM -> H5T_LOGICAL
H5RefClass$close()H5RefClass$dec_ref()H5RefClass$get_file_id()H5RefClass$get_obj_type()H5RefClass$get_ref()H5RefClass$inc_ref()H5RefClass$methods()H5T$attr_delete()H5T$attr_delete_by_idx()H5T$attr_delete_by_name()H5T$attr_exists()H5T$attr_exists_by_name()H5T$attr_get_number()H5T$attr_info_by_idx()H5T$attr_info_by_name()H5T$attr_name_by_idx()H5T$attr_open()H5T$attr_open_by_idx()H5T$attr_open_by_name()H5T$attr_rename()H5T$attr_rename_by_name()H5T$copy()H5T$create_attr()H5T$create_attr_by_name()H5T$create_reference()H5T$detect_class()H5T$equal()H5T$get_class()H5T$get_create_plist()H5T$get_native_type()H5T$get_obj_name()H5T$get_offset()H5T$get_order()H5T$get_pad()H5T$get_precision()H5T$get_size()H5T$is_committed()H5T$is_vlen()H5T$obj_info()H5T$print()H5T$set_offset()H5T$set_order()H5T$set_pad()H5T$set_precision()H5T$to_text()H5T_INTEGER$get_sign()H5T_INTEGER$set_sign()H5T_ENUM$describe()H5T_ENUM$get_labels()H5T_ENUM$get_super()H5T_ENUM$get_values()H5T_ENUM$set_size()H5T_LOGICAL$new()Create a logical datatype. This is internally represented by an ENUM-type
H5T_LOGICAL$new(include_NA = TRUE, id = NULL)
include_NALogical; should the enumeration include a level for NA.
idInternal use only
Holger Hoefling
Inherits from class H5T.
Object of class H5T_STRING.
H5RefClass -> H5T -> H5T_STRING
H5RefClass$close()H5RefClass$dec_ref()H5RefClass$get_file_id()H5RefClass$get_obj_type()H5RefClass$get_ref()H5RefClass$inc_ref()H5RefClass$methods()H5T$attr_delete()H5T$attr_delete_by_idx()H5T$attr_delete_by_name()H5T$attr_exists()H5T$attr_exists_by_name()H5T$attr_get_number()H5T$attr_info_by_idx()H5T$attr_info_by_name()H5T$attr_name_by_idx()H5T$attr_open()H5T$attr_open_by_idx()H5T$attr_open_by_name()H5T$attr_rename()H5T$attr_rename_by_name()H5T$copy()H5T$create_attr()H5T$create_attr_by_name()H5T$create_reference()H5T$detect_class()H5T$equal()H5T$get_class()H5T$get_create_plist()H5T$get_native_type()H5T$get_obj_name()H5T$get_offset()H5T$get_order()H5T$get_pad()H5T$get_precision()H5T$is_committed()H5T$is_vlen()H5T$obj_info()H5T$print()H5T$set_offset()H5T$set_order()H5T$set_pad()H5T$set_precision()H5T$set_size()H5T$to_text()H5T_STRING$new()Create a string datatype
H5T_STRING$new(type = c("c", "fortran"), size = 1, id = NULL)
typeThe type to use. For a dataspace one of "simple", "scalar" or "null"; otherwise an object of class H5T.
sizeSize of the string object. Set to Inf for variable size strings
idinternal use only
H5T_STRING$get_size()Retrieves the length of the string, setting it to Inf it is of variable length. This function implements the HDF5-API function H5Tis_variable_str. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T_STRING$get_size(variable_as_inf = TRUE)
variable_as_infLogical; should variable-length strings report their size as Inf.
H5T_STRING$get_cset()This function implements the HDF5-API function H5Tget_cset. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T_STRING$get_cset()
H5T_STRING$set_cset()This function implements the HDF5-API function H5Tset_cset. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T_STRING$set_cset(cset = c("unknown", "UTF-8"))
csetThe character set to use; one of the H5T_CSET_* values in h5const.
H5T_STRING$set_strpad()This function implements the HDF5-API function H5Tset_strpad. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T_STRING$set_strpad(strpad)
strpadThe string padding to use; one of the H5T_STR_* values in h5const.
H5T_STRING$get_strpad()This function implements the HDF5-API function H5Tget_strpad. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T_STRING$get_strpad()
H5T_STRING$describe()Print a detailed description of the datatype; this is experimental
H5T_STRING$describe()
Holger Hoefling
# fixed width string str_flen <- H5T_STRING$new(size=100) str_flen$is_vlen() str_flen # variable length string str_vlen <- H5T_STRING$new(size=Inf) str_vlen$is_vlen() str_vlen# fixed width string str_flen <- H5T_STRING$new(size=100) str_flen$is_vlen() str_flen # variable length string str_vlen <- H5T_STRING$new(size=Inf) str_vlen$is_vlen() str_vlen
Inherits from class H5T. This can make any datatype a variable length datatype.
This would mostly be intended for storing ragged arrays.
Object of class H5T_VLEN.
H5RefClass -> H5T -> H5T_VLEN
H5RefClass$close()H5RefClass$dec_ref()H5RefClass$get_file_id()H5RefClass$get_obj_type()H5RefClass$get_ref()H5RefClass$inc_ref()H5RefClass$methods()H5T$attr_delete()H5T$attr_delete_by_idx()H5T$attr_delete_by_name()H5T$attr_exists()H5T$attr_exists_by_name()H5T$attr_get_number()H5T$attr_info_by_idx()H5T$attr_info_by_name()H5T$attr_name_by_idx()H5T$attr_open()H5T$attr_open_by_idx()H5T$attr_open_by_name()H5T$attr_rename()H5T$attr_rename_by_name()H5T$copy()H5T$create_attr()H5T$create_attr_by_name()H5T$create_reference()H5T$detect_class()H5T$equal()H5T$get_class()H5T$get_create_plist()H5T$get_native_type()H5T$get_obj_name()H5T$get_offset()H5T$get_order()H5T$get_pad()H5T$get_precision()H5T$get_size()H5T$is_committed()H5T$is_vlen()H5T$obj_info()H5T$print()H5T$set_offset()H5T$set_order()H5T$set_pad()H5T$set_precision()H5T$set_size()H5T$to_text()H5T_VLEN$new()Create a variable length datatype
H5T_VLEN$new(dtype_base, id = NULL)
dtype_baseThe basis-type of the variable length datatype
idInternal use only
H5T_VLEN$get_super()This function implements the HDF5-API function H5Tget_super. Please see the documentation at https://support.hdfgroup.org/documentation/hdf5/latest/group___h5_t.html for details.
H5T_VLEN$get_super()
H5T_VLEN$describe()Print a detailed description of the datatype; this is experimental
H5T_VLEN$describe()
Holger Hoefling
vlen_int <- H5T_VLEN$new(h5types$H5T_NATIVE_INT) vlen_intvlen_int <- H5T_VLEN$new(h5types$H5T_NATIVE_INT) vlen_int
HDF5 provides many native datatypes. These are all stored in the h5types
environment. An overview of all available types can be seen using h5types$overview.
Any specific type can be accessed using the $-operator. See also the examples below.
Holger Hoefling
h5types$overview h5types$H5T_NATIVE_INT h5types$H5T_NATIVE_DOUBLEh5types$overview h5types$H5T_NATIVE_INT h5types$H5T_NATIVE_DOUBLE
Return the version of the HDF5-API
h5version(verbose = TRUE)h5version(verbose = TRUE)
verbose |
Should the information be printed to the screen as well |
Return the version of the HDF5-API and print it to the screen if requested
Version of the underlying HDF5 API as a string
Holger Hoefling
Check if a file is an HDF5 file
is_hdf5(name)is_hdf5(name)
name |
The name of the file to check |
Uses the HDF5 function H5Fis_hdf5 to check if a file is of type HDF5.
Logical, TRUE if file is of type HDF5
Holger Hoefling
List all Group (H5Group) and Dataset (H5D)
names in the current object. This function is part of the h5 wrapper classes and
uses $ls() to retrieve group names.
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, ... )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, ... )
object |
|
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 |
obj_type |
character; Object type to be returned. |
/ root of the fileGet the names of the items in the group or at the / root of the file
## S3 method for class 'H5Group' names(x) ## S3 method for class 'H5File' names(x)## S3 method for class 'H5Group' names(x) ## S3 method for class 'H5File' names(x)
x |
Works similar to the regular names function for a list. The names of the items of either a
H5File at the root or a H5Group are returned as a character vector.
The items are then accessed, again similar to a list, using [[.
A character vector with the names of the items in the group/file.
Holger Hoefling
Print a data frame that includes extended factor objects
## S3 method for class 'data.frame_ext' print(x, ...)## S3 method for class 'data.frame_ext' print(x, ...)
x |
The |
... |
Parameters to be passed on directly to |
The regular print function for data-frames has special methods built-in for factors so that
the label is printed instead of the constant. This function is intended to provide the same functionality
for data frames with extended factors, by adding the class data.frame_ext to the class vector.
The object to print itself, invisibly
Holger Hoefling
Convert a text description to a datatype
text_to_dtype(text, lang_type = h5const$H5LT_DDL)text_to_dtype(text, lang_type = h5const$H5LT_DDL)
text |
The text to convert to the datatype |
lang_type |
The type of language to use; currently only |
Converts a text to a datatype using the HDF5 function H5LT_text_to_dtype.
A datatype corresponding to the text with the appropriate class inheriting from H5T.
Holger Hoefling