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
.
new(id)
Internal use only
get_class()
This function implements the HDF5-API function H5Tget_class. Please see the documentation at https://portal.hdfgroup.org/display/HDF5/H5T_GET_CLASS for details.
get_size(...)
This function implements the HDF5-API function H5Tget_size. Please see the documentation at https://portal.hdfgroup.org/display/HDF5/H5T_GET_SIZE for details.
Parameters
ignored
set_size(size)
This function implements the HDF5-API function H5Tset_size. Please see the documentation at https://portal.hdfgroup.org/display/HDF5/H5T_SET_SIZE for details.
set_precision(precision)
This function implements the HDF5-API function H5Tset_precision. Please see the documentation at https://portal.hdfgroup.org/display/HDF5/H5T_SET_PRECISION for details.
get_precision()
This function implements the HDF5-API function H5Tget_precision. Please see the documentation at https://portal.hdfgroup.org/display/HDF5/H5T_GET_PRECISION for details.
set_order(order)
This function implements the HDF5-API function H5Tset_order. Please see the documentation at https://portal.hdfgroup.org/display/HDF5/H5T_SET_ORDER for details.
get_order()
This function implements the HDF5-API function H5Tget_order. Please see the documentation at https://portal.hdfgroup.org/display/HDF5/H5T_GET_ORDER for details.
set_offset(offset)
This function implements the HDF5-API function H5Tset_offset. Please see the documentation at https://portal.hdfgroup.org/display/HDF5/H5T_SET_OFFSET for details.
get_offset()
This function implements the HDF5-API function H5Tget_offset. Please see the documentation at https://portal.hdfgroup.org/display/HDF5/H5T_GET_OFFSET for details.
set_pad(pad)
This function implements the HDF5-API function H5Tset_pad. Please see the documentation at https://portal.hdfgroup.org/display/HDF5/H5T_SET_PAD for details.
get_pad()
This function implements the HDF5-API function H5Tget_pad. Please see the documentation at https://portal.hdfgroup.org/display/HDF5/H5T_GET_PAD for details.
copy()
This function implements the HDF5-API function H5Tcopy. Please see the documentation at https://portal.hdfgroup.org/display/HDF5/H5T_COPY for details.
is_committed()
This function implements the HDF5-API function H5Tcommitted. Please see the documentation at https://portal.hdfgroup.org/display/HDF5/H5T_COMMITTED for details.
equal(dtype)
This function implements the HDF5-API function H5Tequal. Please see the documentation at https://portal.hdfgroup.org/display/HDF5/H5T_EQUAL 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://portal.hdfgroup.org/display/HDF5/H5T_DETECT_CLASS 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://portal.hdfgroup.org/display/HDF5/H5T_GET_NATIVE_TYPE for details.
get_create_plist()
This function implements the HDF5-API function H5Tget_create_plist. Please see the documentation at https://portal.hdfgroup.org/display/HDF5/H5T_GET_CREATE_PLIST 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://portal.hdfgroup.org/display/HDF5/H5LT_DTYPE_TO_TEXT 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://portal.hdfgroup.org/display/HDF5/H5O_GET_INFO for details.
get_obj_name()
This function implements the HDF5-API function H5Iget_name. Please see the documentation at https://portal.hdfgroup.org/display/HDF5/H5I_GET_NAME 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://portal.hdfgroup.org/display/HDF5/H5A_CREATE2 for details.
attr_open(attr_name)
This function implements the HDF5-API function H5Aopen. Please see the documentation at https://portal.hdfgroup.org/display/HDF5/H5A_OPEN 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://portal.hdfgroup.org/display/HDF5/H5A_CREATE_BY_NAME 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://portal.hdfgroup.org/display/HDF5/H5A_OPEN_BY_NAME 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://portal.hdfgroup.org/display/HDF5/H5A_OPEN_BY_IDX 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://portal.hdfgroup.org/display/HDF5/H5A_EXISTS_BY_NAME for details.
attr_exists(attr_name)
This function implements the HDF5-API function H5Aexists. Please see the documentation at https://portal.hdfgroup.org/display/HDF5/H5A_EXISTS 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://portal.hdfgroup.org/display/HDF5/H5A_RENAME_BY_NAME for details.
attr_rename(old_attr_name, new_attr_name)
This function implements the HDF5-API function H5Arename. Please see the documentation at https://portal.hdfgroup.org/display/HDF5/H5A_RENAME for details.
attr_delete(attr_name)
This function implements the HDF5-API function H5Adelete. Please see the documentation at https://portal.hdfgroup.org/display/HDF5/H5A_DELETE 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://portal.hdfgroup.org/display/HDF5/H5A_DELETE_BY_NAME 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://portal.hdfgroup.org/display/HDF5/H5A_DELETE_BY_IDX 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://portal.hdfgroup.org/display/HDF5/H5A_GET_INFO_BY_NAME 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://portal.hdfgroup.org/display/HDF5/H5A_GET_INFO_BY_IDX 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://portal.hdfgroup.org/display/HDF5/H5A_GET_NAME_BY_IDX 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://portal.hdfgroup.org/display/HDF5/H5R_CREATE for details.
# NOT RUN {
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)
# }
Run the code above in your browser using DataLab