modifyShape: Function to modify dataset shape

Description Usage Arguments Value Note Examples

View source: R/rhdf5api.R

Description

Function to modify dataset shape

Usage

1
modifyShape(url, domain, newshape)

Arguments

url

character string with http server url

domain

character string with domain name to be created

newshape

numeric vector with new dataset new dataset shape (works for a resizeable dataset)

Value

r http response object

Note

"http://170.223.248.164:7248/datasets/dsetuuid/shape"

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
if (nchar(Sys.getenv("password"))>0) {
    tstring = sub("\\/", "", tempfile(tmpdir=""))
    dom = putDomain("http://170.223.248.164:7248", paste(tstring, ".hdfgroup.org", sep=""))
    ds = postDataset(url="http://170.223.248.164:7248/datasets",
        domain=paste(tstring, ".hdfgroup.org", sep=""),  
        type="H5T_IEEE_F32LE",
        shape=c(10,5), maxdims=c(0,5))
    response = GET(url="http://170.223.248.164:7248/datasets",
              add_headers(host=paste(tstring, ".hdfgroup.org", sep="")))
    dsetuuid = content(response)$datasets[[1]]     # taking the first dataset id
    modShape = modifyShape(url=paste0("http://170.223.248.164:7248/datasets/",dsetuuid,"/shape"),
              domain=paste(tstring, ".hdfgroup.org", sep=""), newshape=c(20,5))
    ans = readBin(modShape$content, what="character")
    ans
    }

shwetagopaul92/rhdf5_api documentation built on May 21, 2019, 10:08 a.m.