picsure: Query your study via the PIC-SURE API

Description Usage Arguments Value Author(s) Examples

Description

For this beta version, it is only possible to query phenotypics data. Soon, the package will be upgraded to be able to query genotypics data from Hail.

Usage

1
picsure(env, key, var, subset = "ALL", gabe = FALSE, verbose = FALSE)

Arguments

env

The URL of the environment

key

The key or the token to log in your environment

var

A vector with the variables of interest. You can put a variable, or a path, as you want. You can also use the * key if you want to use a wild card. If an argument corresponds to a node, it will return all the variables below the node

subset

By default, subset = ALL and gives you back all the patients that have at least one variable of interest. See the examples for more complex subsets. !! Similarly, the "subsetting" part needs to be slightly modified to handle the "find" function from picsure.

gabe

if TRUE, will export the JSON query as a query.txt file in you working directory. By default, gabe = FALSE

verbose

By default, verbose = FALSE. Set it to verbose = TRUE to get the log informations

Value

Returns a data.frame

Author(s)

Gregoire Versmee, Laura Versmee, Mikael Dusenne, Alba Gutierrez

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
Without any subset, will return all the patients that have at least one value for a variable of interest
environment <- "https://nhanes.hms.harvard.edu"
key <- "yourkeyortoken"
pcb <- "PCB153 (ng per g)"
age <- "AGE*"
sex <- "demographics/SEX"
variables <- c(pcb, sex, age)
picsure(environment, key, variables)

Adding a variable as subset will return only the patient that have a value for this specific variable (can be combined with AND, OR, NOT)
subset <- "(laboratory/pcbs/PCB153 (ng per g))"
picsure(environment, key, variables, subset)

The continuous variable can be filtered by <, >, ==, !=, <=, >=.
subset <- "(/demographics/AGE > 60) | (/demographics/AGE < 20)"
picsure(environment, key, variables, subset)

gversmee/picsuRe documentation built on May 24, 2019, 9:50 a.m.