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", 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 (full paths with forward slashes). 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

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

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 <- "laboratory/pcbs/PCB153 (ng per g)"
age <- "demographics/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)

hms-dbmi/Rcheesecake documentation built on May 25, 2019, 8:31 p.m.