HDF5 Datatype Interface {rhdf5} | R Documentation

## HDF5 Datatype Interface

### Description

These functions create and manipulate the datatype which describes elements of a dataset.

### Usage

    H5Tcopy      (dtype_id = h5default(type = "H5T"))
    H5Tset_cset  (dtype_id, cset = "ASCII")
    H5Tget_cset  (dtype_id)
    H5Tset_size  (dtype_id = h5default(type = "H5T"), size)
    H5Tget_size  (dtype_id)
    H5Tset_strpad(dtype_id, strpad = "NULLPAD")
    H5Tget_strpad(dtype_id)

### Arguments

`dtype_id` | A character name of a datatype. See `h5const("H5T")` for possible datatypes. Can also be an integer representing an HDF5 datatype.
`cset` | Encoding to use for string types. Valid options are 'ASCII' and 'UTF8'.
`size` | The total size in bytes.
`strpad` | Character string repsenting the type of padding to be used. Valid options are 'NULLTERM', 'NULLPAD', 'SPACEPAD'

### Details

Interface to the HDF5 C-library libhdf5. See https://portal.hdfgroup.org/display/HDF5/Datatypes for further details.

### Value

The functions return the standard return value from their respective C-functions.

### Author(s)

Bernd Fischer

### References

https://portal.hdfgroup.org/display/HDF5

### See Also

rhdf5

### Examples

    # create character datatype with string length 10
    tid <- H5Tcopy("H5T_C_S1")
    H5Tset_size(tid, 10L)

    # List all predefined types implemented in the R-interface
    h5const("H5T")

    # List all available type classes (not all of them are implemented)
    h5const("H5T_CLASS")

[Package rhdf5 version 2.36.0 Index]