Extract.hdf5 {rhdf5} | R Documentation |
These are subset operators for HDF5 objects. The name provides specialization (often via method dispatch) for the different specific types of HDF5 objects.
x[i] x[i, j, ...] x[i, j, ..., drop=TRUE] x$name
x |
An object of class hdf5 . |
i |
An index into the object. |
j |
An index into the object. |
... |
Optional arguments. |
drop |
A logical value, if TRUE the result
is coerced to the lowest possible dimension |
name |
The element of a file or group to extract. |
These operations only make sense for specific types of HDF5
objects. The names of the functions indicate their specialization.
There is currently no [[
operator.
For HDF5 groups and files the $
operator extracts the
appropriate element.
For the $
operator an HDF5 object of the appropriate class is
returned. For the [
operator an R vector containing the subset
is returned. It is envisaged that at some point we may make the
[
operator smarter and allow the return of an HDF5 object in
situations where the returned value will be very large.
B. Ellis and R. Gentleman
## Not run: mad <- hdf5.open("microarray.h5") hdf5.group(mad,"chip1") hdf5.group(mad$chip1,"group") hdf5.group.rm(mad$chip1,"group") x1 <- hdf5.dataset(mad$chip1, "AA", dim=c(5, 5)) x1[,1, drop=FALSE] ## End(Not run)