Description Usage Arguments Details Value Author(s) References See Also Examples
These functions create and manipulate the dataspace in which to store the elements of a dataset.
1 2 3 4 5 6 7 8 9 10 11 12 | H5Screate (type = h5default("H5S"), native = FALSE)
H5Screate_simple (dims, maxdims, native = FALSE)
H5Scopy (h5space)
H5Sclose (h5space)
H5Sis_simple (h5space)
H5Sget_simple_extent_dims (h5space)
H5Sset_extent_simple (h5space, dims, maxdims)
H5Sselect_hyperslab (h5space, op = h5default("H5S_SELECT"),
start = NULL, stride = NULL, count = NULL,
block = NULL)
H5Sselect_index (h5space, index)
H5Sunlimited ()
|
type |
See |
dims |
Dimension of the dataspace. This argument is similar to the dim attribute of an array. When viewing the HDF5 dataset with an C-program (e.g. HDFView), the dimensions appear in inverted order, because the fastest changing dimension in R is the first one, and in C its the last one. |
maxdims |
Maximum extension of the dimension of the dataset in the file. If not provided, it is set to dims. |
native |
An object of class |
.
h5space |
An object of class |
index |
A list of integer indices. The length of the list corresponds to the number of dimensions of the HDF5 array. |
op |
See h5const("H5S_SELECT") for possible arguments. |
start |
The start coordinate of a hyperslab (similar to subsetting in R). Counting is R-style 1-based. |
stride |
The stride of the hypercube. Read the introduction http://ftp.hdfgroup.org/HDF5/Tutor/phypecont.html before using this argument. R behaves like Fortran in this example. |
count |
The number of blocks to be written. |
block |
The block size of the hyperslab. Read the introduction http://ftp.hdfgroup.org/HDF5/Tutor/phypecont.html before using this argument. R behaves like Fortran in this example. |
Interface to the HDF5 C-library libhdf5. See https://portal.hdfgroup.org/display/HDF5/Dataspaces for further details.
As an introduction to use hyperslabs see these tutorials: See these introductions to hyperslabs: https://support.hdfgroup.org/HDF5/Tutor/selectsimple.html, https://support.hdfgroup.org/HDF5/Tutor/select.html and http://ftp.hdfgroup.org/HDF5/Tutor/phypecont.html. Please note that in R the first dimension is the fastest changing dimension. When viewing the HDF5 datasets with any C-program (e.g. HDFView), the order of dimensions is inverted. In the R interface counting starts with 1, whereas in the C-programs (e.g. HDFView) counting starts with 0.
H5Sselect_index
is not part of the standard HDF5 C interface. It performes an iterative call to H5select_points by iterating through the given index positions. This function avoids a for loop in R. If a list element is NULL, all elements of the respective dimension are considered.
H5Screate
, H5Screate_simple
, and H5Scopy
return an object of class H5IdComponent
representing a dataspace.
H5Sis_simple
returns a boolean.
H5Sget_simple_extent_dims
returns an integer vector.
H5Sunlimited
is a simple macro to return the constant H5S_UNLIMITED
that can be provided to the maxdims
arguments of H5Screate_simple
to create and extensible dataspace.
The other functions return the standard return value from their respective C-functions.
Bernd Fischer
https://portal.hdfgroup.org/display/HDF5
rhdf5
1 2 3 4 5 6 7 8 9 10 11 12 | sid <- H5Screate_simple(c(10,5,3))
sid
H5Sis_simple(sid)
H5Sget_simple_extent_dims(sid)
# select a subarray (called hyperslab in the hdf5 community).
# The next h5write can use this to write a subarray
H5Sselect_index(sid, list(1:3,2:4,2))
# always close dataspaces after usage to free recources
H5Sclose(sid)
sid
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.