knitr::opts_chunk$set(echo = TRUE)
rh5pydclient
is a R wrapper for the python package h5pyd
.
library(rh5pydclient)
The user must have a python executable, the R package reticulate
and the python package h5pyd
installed. The initPython
initializes access to python and checks that h5pyd
is installed. The user can set the path to the preferred python executable. By default, reticulate
will search for a python executable to use.
initPython()
Connect to a h5serv
or hsds
server and identify a H5 file to open.
conn <- initConn(domain='/home/stvjc/tenx_full.h5', mode='r', endpoint='http://52.4.181.237:5101')
Obtain a handle to a dataset.
D <- getDataset(conn, 'newassay001')
At present, the only way to signify the submatrix to fetch is to pass slices as constant
R strings in the format start:stop:step
. The indices should be in R convention, i.e.,
the first array subscript is 1 (not 0) and if stop-start
is a multiple of step
,
the index stop
is included in the slice.
A <- getSubmatrix(D, c('200:300:1', '400:600:1')) sum(A) # should be 2848
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.