Write an R object as an HDF5 attribute
h5writeAttribute(
attr,
h5obj,
name,
h5loc,
encoding = NULL,
variableLengthString = FALSE,
asScalar = FALSE,
checkForNA = TRUE
)
# S3 method for class 'array'
h5writeAttribute(
attr,
h5obj,
name,
h5loc,
encoding = NULL,
variableLengthString = FALSE,
asScalar = FALSE,
checkForNA = TRUE
)The R object to be written as an HDF5 attribute.
Normally an object of class H5IdComponent representing a
H5 object identifier (file, group, or dataset). See
H5Fcreate, H5Fopen, H5Gcreate,
H5Gopen, H5Dcreate, or H5Dopen to
create an object of this kind. This argument can also be given the path to
an HDF5 file.
The name of the attribute to be written.
The location of the group or dataset within a file to which the
attribute should be attached. This argument is only used if the
h5obj argument is the path to an HDF5 file, otherwise it is ignored.
The encoding of the string data type. Valid options are "ASCII" and "UTF-8".
Whether character vectors should be written as variable-length strings into the attributes.
Whether length-1 attr should be written into a scalar
dataspace.
Whether a attr should be checked for NA
values before being written. This only applies of attr is of type
logical. Testing for NA values can be slow if the object to be
written is large, so if you are sure no such values will be present this
argument can be used to disable the testing.