knitr::opts_chunk$set(echo = TRUE)

Package

rh5pydclient is a R wrapper for the python package h5pyd.

library(rh5pydclient)

Initialization

Initialize python and check for required packages.

initPython()

Connect to the server

This server is an AWS instance with ID i-046c975236be75444. It is not usually running. To run this vignette, email Sam and ask to have it started.

Connect to a h5serv or hsds server and identify a H5 file to open.

endpoint = 'http://54.224.146.67:5000'
domain = 'tinyfile.public.gliobulk.org'
conn <- initConn(domain=domain, mode='r+', endpoint=endpoint)

Open a dataset

Obtain a handle to a dataset.

D <- getDataset(conn, 'tinyds')

Upload data

At present, the only way to signify the submatrix to fetch or store to 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 <- array(c(4, 14, 7, 17, 5, 15, 9, 19), dim=c(2, 2, 2))
setSubmatrix(D, c('7:8:1', '11:12:1', '11:12:1'), A)
# check
getSubmatrix(D, c('7:8:1', '11:12:1', '11:12:1'))


sampoll/rh5pydclient documentation built on May 3, 2019, 3:41 p.m.