guess_nelem {hdf5r} | R Documentation |
Guess the HDF5 datatype of an R object
Description
Guess the HDF5 datatype of an R object
Usage
guess_nelem(x, dtype)
guess_dim(x)
guess_dtype(x, ds_dim = NULL, scalar = FALSE,
string_len = getOption("hdf5r.default_string_len"))
Arguments
x |
The object for which to guess the HDF5 datatype or the dimension or the number of elements |
dtype |
datatype; used in guessing the number of dataset elements of an r object |
ds_dim |
Can explicitly set the dimension of the dataset object. For |
scalar |
Should the datatype be created so that |
string_len |
If a string is in the R object, the length to which the corresponding HDF5 type should be set. If it is a
positive integer, the string is of that length. If it is |
Details
Given an object, it creates a datatype in HDF5 that would match this object. For simple datasets like arrays, this function is not so useful, but is very good for creating dataframes or hierarchical objects (like lists of dataframes) etc.
Value
An object of class H5T
that represents the HDF5-type of the Robj that was passed in
Author(s)
Holger Hoefling