h5load: h5load

Usage Arguments Examples

View source: R/do.r

Usage

1
h5load(file, path = "/")

Arguments

file
path

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (file, path = "/") 
{
    group2node = function(node) {
        if (is.null(node$value)) 
            lapply(node, group2node)
        else if (is.null(dim(node$value))) 
            setNames(node$value, node$names_1)
        else {
            nidx = sapply(1:length(dim(node$value)), function(i) paste0("names_", 
                i))
            dimnames(node$value) = unname(node[nidx])
            node$value
        }
    }
    group2node(h5read(file, path))
  }

mschubert/r-h5store documentation built on May 23, 2019, 7:51 a.m.