Inherits from class H5T.

Value

Object of class H5T_STRING.

Methods

new(type = c("c", "fortran"), size = 1, id = NULL)

Create a string datatype

Parameters

A

C or fortran type string

size

Size of the string object. Set to Inf for variable size strings

id

internal use only

get_size(variable_as_inf = TRUE)

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

get_cset()

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

set_cset(cset = c("unknown", "UTF-8"))

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

set_strpad(strpad)

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

get_strpad()

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

describe()

Print a detailed description of the datatype; this is experimental

See also

Author

Holger Hoefling

Examples

# fixed width string
str_flen <- H5T_STRING$new(size=100)
str_flen$is_vlen()
#> [1] FALSE
str_flen
#> Class: H5T_STRING
#> Datatype: H5T_STRING {
#>       STRSIZE 100;
#>       STRPAD H5T_STR_NULLTERM;
#>       CSET H5T_CSET_ASCII;
#>       CTYPE H5T_C_S1;
#>    }

# variable length string
str_vlen <- H5T_STRING$new(size=Inf)
str_vlen$is_vlen()
#> [1] TRUE
str_vlen
#> Class: H5T_STRING
#> Datatype: H5T_STRING {
#>       STRSIZE H5T_VARIABLE;
#>       STRPAD H5T_STR_NULLTERM;
#>       CSET H5T_CSET_ASCII;
#>       CTYPE H5T_C_S1;
#>    }