h5_createAttribute | R Documentation |
R function to create an HDF5 attribute and defining its dimensionality.
h5createAttribute(
obj,
attr,
dims,
maxdims = dims,
file,
storage.mode = "double",
H5type = NULL,
size = NULL,
encoding = NULL,
cset = NULL,
native = FALSE
)
obj |
The name (character) of the object the attribute will be attatched
to. For advanced programmers it is possible to provide an object of class
H5IdComponent representing a H5 object identifier (file, group,
dataset). See |
attr |
Name of the attribute to be created. |
dims |
The dimensions of the attribute as a numeric vector. If
|
maxdims |
The maximum extension of the attribute. |
file |
The filename (character) of the file in which the dataset will be
located. For advanced programmers it is possible to provide an object of
class H5IdComponent representing an H5 location identifier. See
|
storage.mode |
The storage mode of the data to be written. Can be
obtained by |
H5type |
Advanced programmers can specify the datatype of the dataset
within the file. See |
size |
The maximum string length when If this argument is set to |
encoding |
The encoding of the string data type i.e. when |
cset |
Deprecated in favour of the |
native |
An object of class |
Creates a new attribute and attaches it to an existing HDF5 object. The function will fail, if the file doesn't exist or if there exists already another attribute with the same name for this object.
You can use h5writeAttribute()
immediately. It will create the attribute
for you.
Returns TRUE is attribute was created successfully and FALSE otherwise.
Bernd Fischer
https://portal.hdfgroup.org/display/HDF5
h5createFile()
, h5createGroup()
, h5createDataset()
,
h5read()
, h5write()
, rhdf5
h5File <- tempfile(pattern = "ex_createAttribute.h5")
h5createFile(h5File)
h5write(1:1, h5File, "A")
fid <- H5Fopen(h5File)
did <- H5Dopen(fid, "A")
h5createAttribute (did, "time", c(1,10))
H5Dclose(did)
H5Fclose(fid)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.