putValue: Function to insert values into dataset

Description Usage Arguments Value Note Examples

View source: R/rhdf5api.R

Description

Function to insert values into dataset

Usage

1
putValue(url, domain, value, start, stop, step)

Arguments

url

character string with http server url

domain

character string with domain name to be created

value

list with values to be inserted into dataset

start

(optional)numeric vector with starting coordinate of selection to be updated

stop

(optional)numeric vector with ending coordinate of selection to be updated

step

(optional)numeric vector with step value

Value

r http response object

Note

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
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(2,2), maxdims=c(0,0))
    response = GET(url="http://170.223.248.164:7248/datasets",
              add_headers(host=paste(tstring, ".hdfgroup.org", sep="")))
    dsetuuid = content(response)$datasets[[2]]     # taking the required dataset id 
    modShape = modifyShape(url=paste0("http://170.223.248.164:7248/datasets/",dsetuuid,"/shape"),
              domain=paste(tstring, ".hdfgroup.org", sep=""), newshape=c(3,3))
    mymat = matrix(1:9, nrow=3, ncol=3)
    insertVal = putValue(url=paste0("http://170.223.248.164:7248/datasets/",dsetuuid,"/value"),
               domain=paste(tstring, ".hdfgroup.org", sep=""), value=mymat,
               start=c(0,0),stop=c(3,3),step=c(1,1))
    }

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