H5T_enum: Create or modify an HDF5 enum datatype

H5T_enumR Documentation

Create or modify an HDF5 enum datatype

Description

Create or modify an HDF5 enum datatype

Usage

H5Tenum_create(dtype_id = "H5T_NATIVE_INT")

H5Tenum_insert(dtype_id, name, value)

Arguments

dtype_id

ID of HDF5 datatype to work with. For H5Tenum_create, this is the identifier of the base data type, and must be an integer e.g. H5T_NATIVE_INT. For H5Tenum_insert this will be a datatype identifier created by H5Tenum_create.

name

The name of a the new enum member. This is analogous to a "level" in an R factor.

value

The value of the new member. Must be compatible with the base datatype defined by dtype_id.

Value

  • H5Tinsert_enum() returns an character representing the H5 identifier of the new datatype.

  • H5Tset_precision() is called for its side-effect of modifying the existing datatype. It will invisibly return TRUE if this is successful FALSE if not.

Examples

tid <- H5Tenum_create(dtype_id = "H5T_NATIVE_UCHAR")
H5Tenum_insert(tid, name = "TRUE", value = 1L)
H5Tenum_insert(tid, name = "FALSE", value = 0L)


grimbough/rhdf5 documentation built on Sept. 14, 2024, 8:41 a.m.