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

Integer

H5T_INTEGER

Bitfield

H5T_BITFIELD (currently identical to the integer class)

Float

H5T_FLOAT

Enum

H5T_ENUM

Compound

H5T_COMPOUND

String

H5T_STRING

Complex

H5T_COMPLEX

Array

H5T_ARRAY

Variable Length

H5T_VLEN

Value

Object of class H5T.

Methods

new(id)

Internal use only

get_class()

This function implements the HDF5-API function H5Tget_class. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_t.html for details.

get_size(...)

This function implements the HDF5-API function H5Tget_size. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_t.html for details.

Parameters

...

ignored

set_size(size)

This function implements the HDF5-API function H5Tset_size. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_t.html for details.

set_precision(precision)

This function implements the HDF5-API function H5Tset_precision. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_t.html for details.

get_precision()

This function implements the HDF5-API function H5Tget_precision. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_t.html for details.

set_order(order)

This function implements the HDF5-API function H5Tset_order. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_t.html for details.

get_order()

This function implements the HDF5-API function H5Tget_order. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_t.html for details.

set_offset(offset)

This function implements the HDF5-API function H5Tset_offset. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_t.html for details.

get_offset()

This function implements the HDF5-API function H5Tget_offset. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_t.html for details.

set_pad(pad)

This function implements the HDF5-API function H5Tset_pad. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_t.html for details.

get_pad()

This function implements the HDF5-API function H5Tget_pad. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_t.html for details.

copy()

This function implements the HDF5-API function H5Tcopy. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_t.html for details.

is_committed()

This function implements the HDF5-API function H5Tcommitted. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_t.html for details.

equal(dtype)

This function implements the HDF5-API function H5Tequal. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_t.html for details.

is_vlen()

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

detect_class(dtype_class)

This function implements the HDF5-API function H5Tdetect_class. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_t.html for details.

get_native_type(direction = h5const$H5T_DIR_ASCEND)

This function implements the HDF5-API function H5Tget_native_type. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_t.html for details.

get_create_plist()

This function implements the HDF5-API function H5Tget_create_plist. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_t.html for details.

to_text(lang_type = h5const$H5LT_DDL)

This function implements the HDF5-API function H5LTdtype_to_text. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_l_t.html for details.

print(...)

Prints information for the group

Parameters

...

ignored

obj_info(remove_internal_use_only = TRUE)

This function implements the HDF5-API function H5Oget_info. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_o.html for details.

get_obj_name()

This function implements the HDF5-API function H5Iget_name. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_i.html for details.

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

This function implements the HDF5-API function H5Acreate2. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_a.html for details.

attr_open(attr_name)

This function implements the HDF5-API function H5Aopen. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_a.html for details.

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

This function implements the HDF5-API function H5Acreate_by_name. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_a.html for details.

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

This function implements the HDF5-API function H5Aopen_by_name. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_a.html for details.

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

This function implements the HDF5-API function H5Aopen_by_idx. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_a.html for details.

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

This function implements the HDF5-API function H5Aexists_by_name. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_a.html for details.

attr_exists(attr_name)

This function implements the HDF5-API function H5Aexists. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_a.html for details.

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

This function implements the HDF5-API function H5Arename_by_name. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_a.html for details.

attr_rename(old_attr_name, new_attr_name)

This function implements the HDF5-API function H5Arename. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_a.html for details.

attr_delete(attr_name)

This function implements the HDF5-API function H5Adelete. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_a.html for details.

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

This function implements the HDF5-API function H5Adelete_by_name. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_a.html for details.

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

This function implements the HDF5-API function H5Adelete_by_idx. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_a.html for details.

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

This function implements the HDF5-API function H5Aget_info_by_name. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_a.html for details.

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

This function implements the HDF5-API function H5Aget_info_by_idx. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_a.html for details.

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

This function implements the HDF5-API function H5Aget_name_by_idx. Please see the documentation at https://docs.hdfgroup.org/hdf5/v1_10/group___h5_a.html for details.

attr_get_number()

This function implements the HDF5-API function H5Aget_num_attrs. Please see the documentation at https://support.hdfgroup.org/HDF5/doc/RM/RM_H5A.html#Annot-NumAttrs for details.

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

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://docs.hdfgroup.org/hdf5/v1_10/group___h5_r.html for details.

Author

Holger Hoefling

Examples

my_int <- h5types$H5T_NATIVE_INT
my_int$to_text()
#> [1] "H5T_STD_I32LE"
my_int$get_size()
#> [1] 4

# Show how to commit a datatype
fname <- tempfile(fileext = ".h5")
file <- H5File$new(fname, mode = "a")
my_int$is_committed()
#> [1] FALSE
file$commit("my_int", my_int)
my_int$is_committed()
#> [1] TRUE

# can now also add attributes
h5attr(my_int, "test") <- "A string"
h5attributes(my_int)
#> $test
#> [1] "A string"
#> 

file$close_all()
file.remove(fname)
#> [1] TRUE