h5_writeAttribute {rhdf5}R Documentation

Write an R object as an HDF5 attribute

Description

Write an R object as an HDF5 attribute

Usage

h5writeAttribute(
  attr,
  h5obj,
  name,
  cset = c("ASCII", "UTF8"),
  variableLengthString = FALSE,
  asScalar = FALSE
)

## S3 method for class 'array'
h5writeAttribute(
  attr,
  h5obj,
  name,
  cset = c("ASCII", "UTF8"),
  variableLengthString = FALSE,
  asScalar = FALSE
)

Arguments

attr

The R object to be written as an HDF5 attribute.

h5obj

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.

name

The name of the attribute to be written.

cset

The encoding of the string data type.

variableLengthString

Whether character vectors should be written as variable-length strings into the attributes.

asScalar

Whether length-1 attr should be written into a scalar dataspace.


[Package rhdf5 version 2.37.4 Index]