Description Usage Arguments Details See Also Examples
CommonFG is the base class of H5File and H5Group
and represents common functionality of these two classes. The CommonFG base
class supports various subsetting operators to easily access and manipulate
H5Group and DataSet objects
(see also CommonFG-Group and CommonFG-DataSet).
1 2 3 4 5 6 7 8 9 10 11 12 |
.Object |
CommonFG; S4 object of class |
x |
CommonFG; object to be subsetted |
i |
character; Name of |
j |
character; Name of |
... |
Additional arguments passed to |
drop |
logical; specify if class of result set should be dropped (not implemented yet). |
value |
vector/matrix/array; Value to be assigend to dataset |
path |
character; Path to be deleted, either specifying group or dataset. |
Subsetting operators on CommonFG objects represent a convenient way
to create/access H5Group and DataSet objects.
Currently, only character arguments are supported whereas the first argument
specifies the group to be created/accesses and the second the dataset name.
Groups can be created/accessed by simply using one character parameter, e.g.
group <- obj["groupname"].
DataSets can be either accessed by using
dset <- obj["groupname", "datasetname"] if existing or initialized by
using obj["groupname", "datasetname"] <- value.
All created objects e.g. group or dset should be closed in the
end using h5close.
CommonFG-Group CommonFG-DataSet
H5Location-Attribute
1 2 3 4 5 6 7 8 9 10 11 12 13 | file <- h5file("test.h5")
# Create new DataSet 'testset' in H5Group 'testgroup'
file["testgroup/testset"] <- matrix(1:9, nrow = 3)
# Create new DataSet 'testset2' in file root
file["testset2"] <- 1:10
# Retrieve H5Group 'testgroup'
group <- file["testgroup"]
# Retrieve DataSet 'testset'
dset <- group["testset"]
h5close(dset)
h5close(group)
h5close(file)
file.remove("test.h5")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.