Inherits from class H5T.

Value

Object of class H5T_COMPOUND.

Methods

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

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

Parameters

labels

The labels of the columns of the compound object

dtypes

The datatypes of the columns of the object; this is usually a list of objects of class H5T

size

The size of each datatype; if NULL, automatically inferred

offset

The 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

id

Internal use only

pack()

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

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

get_cpd_labels()

Return the labels of the columns as a character vector

get_cpd_classes()

Return the classes of the columns as an object of type factor_ext

get_cpd_offsets()

Return the offsets of the datatypes

describe()

Print a detailed description of the datatype; this is experimental

See also

Author

Holger Hoefling

Examples

# 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
#> Class: H5T_COMPOUND
#> Datatype: H5T_COMPOUND {
#>       H5T_STRING {
#>          STRSIZE 200;
#>          STRPAD H5T_STR_NULLTERM;
#>          CSET H5T_CSET_ASCII;
#>          CTYPE H5T_C_S1;
#>       } "name" : 0;
#>       H5T_STD_I32LE "age" : 200;
#>       H5T_IEEE_F64LE "salary" : 204;
#>    }