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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
### =========================================================================
### Low-level manipulation of HDF5 Dimension Scale datasets
### -------------------------------------------------------------------------
###
### Nothing in this file is exported.
###
### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
### h5isdimscale()
###
h5isdimscale <- function(filepath, name)
{
.Call2("C_h5isdimscale", filepath, name, PACKAGE="HDF5Array")
}
### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
### h5getdimscales() / h5setdimscales()
###
### Retrieve the names of the existing HDF5 datasets (1 per dimension in
### dataset 'name') currently attached along the dimensions of dataset 'name'
### for Dimension Scale 'scalename'.
h5getdimscales <- function(filepath, name, scalename=NA)
{
stopifnot(isSingleStringOrNA(scalename))
scalename <- as.character(scalename)
.Call2("C_h5getdimscales", filepath, name, scalename,
PACKAGE="HDF5Array")
}
### name: The name of the dataset on which to set Dimension Scales.
### dimscales: A character vector containing the names of the existing HDF5
### datasets (1 per dimension in dataset 'name') to attach along
### the dimensions of dataset 'name'. NAs are allowed and, if
### present, nothing gets attached along the corresponding
### dimensions.
### scalename: The name of the Dimension Scale (analog to the name of an
### attribute in R).
h5setdimscales <- function(filepath, name, dimscales, scalename=NA,
dry.run=FALSE)
{
stopifnot(isSingleStringOrNA(scalename),
is.character(dimscales),
isTRUEorFALSE(dry.run))
scalename <- as.character(scalename)
.Call2("C_h5setdimscales", filepath, name, dimscales, scalename, dry.run,
PACKAGE="HDF5Array")
}
### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
### Get/set the "dimension labels" of an HDF5 dataset
###
### The "dimension labels" the HDF5 equivalent of the names on 'dimnames(a)'
### in R.
###
h5getdimlabels <- function(filepath, name)
{
.Call2("C_h5getdimlabels", filepath, name, PACKAGE="HDF5Array")
}
h5setdimlabels <- function(filepath, name, dimlabels)
{
stopifnot(is.character(dimlabels))
invisible(.Call2("C_h5setdimlabels", filepath, name, dimlabels,
PACKAGE="HDF5Array"))
}
|