Description Usage Arguments Details Value Author(s) References See Also Examples
These functions create and manipulate dataset objects, and set and retrieve their constant or persistent properties.
1 2 3 4 5 6 7 | H5Dcreate (h5loc, name, dtype_id, h5space, internal1 = NULL, internal2 = 6)
H5Dopen (h5loc, name)
H5Dclose (h5dataset)
H5Dget_space (h5dataset)
H5Dget_type (h5dataset)
H5Dread (h5dataset, h5spaceFile = NULL, h5spaceMem = NULL, buf = NULL, compoundAsDataFrame = TRUE)
H5Dwrite (h5dataset, buf, h5spaceMem = NULL, h5spaceFile = NULL)
|
h5loc |
An object of class |
name |
Name of the dataset (character). |
dtype_id |
A character name of a datatype. See |
h5space |
An object of class |
h5dataset |
An object of class |
h5spaceFile,h5spaceMem |
An object of class |
buf |
Reading and writing buffer containing the data to written/read. When using the buffer for reading, the buffer size has to fit the size of the memory space |
compoundAsDataFrame |
If true, a compound datatype will be coerced to a data.frame. This is not possible, if the dataset is multi-dimensional. Otherwise the compound datatype will be returned as a list. Nested compound data types will be returned as a nested list. |
internal1,internal2 |
For internal usage only. Will be removed in later versions. |
Interface to the HDF5 C-library libhdf5. See http://www.hdfgroup.org/HDF5/doc/RM/RM_H5D.html for further details.
H5Dcreate
and H5Dopen
return an object of class H5IdComponent
represinting a H5 dataset identifier.
H5Dget_space
returns an object of class H5IdComponent
representing a H5 dataspace identifier.
H5Dread
returns an array with the read data.
The other functions return the standard return value from their respective C-functions.
Bernd Fischer
rhdf5
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | # write a dataset
fid <- H5Fcreate("ex_H5D.h5")
fid
sid <- H5Screate_simple(c(10,5,3))
sid
did <- H5Dcreate(fid, "A", "H5T_STD_I32LE", sid)
did
H5Dwrite(did, 1L:150L, h5spaceMem = sid, h5spaceFile = sid)
H5Dclose(did)
H5Sclose(sid)
H5Fclose(fid)
# read a dataset
fid <- H5Fopen("ex_H5D.h5")
fid
did <- H5Dopen(fid, "A")
did
sid <- H5Dget_space(did)
sid
B <- H5Dread(did)
B
H5Dclose(did)
H5Sclose(sid)
H5Fclose(fid)
# write a subarray
fid <- H5Fopen("ex_H5D.h5")
fid
did <- H5Dopen(fid, "A")
did
sid <- H5Dget_space(did)
sid
H5Sselect_index(sid, list(1:3,2:4,2))
sidmem <- H5Screate_simple(c(3,3,1))
sidmem
A = array(-801:-809,dim=c(3,3,1))
H5Dwrite(did, A, h5spaceMem = sidmem, h5spaceFile = sid)
H5Dread(did)
H5Sclose(sid)
H5Dclose(did)
H5Sclose(sidmem)
H5Fclose(fid)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.