allphenotypes: Get all openSNP phenotypes, their variations, and how many...

View source: R/allphenotypes.R

allphenotypesR Documentation

Get all openSNP phenotypes, their variations, and how many users have data available for a given phenotype.

Description

Either return data.frame with all results, or output a list, then call the characteristic by id (parameter = "id") or name (parameter = "characteristic").

Usage

allphenotypes(df = FALSE, ...)

Arguments

df

Return a data.frame of all data. The column known_variations can take multiple values, so the other columns id, characteristic, and number_of_users are replicated in the data.frame. Default: FALSE

...

Curl options passed on to crul::HttpClient

Value

data.frame of results, or list if df=FALSE

See Also

Other opensnp-fxns: allgensnp(), annotations(), download_users(), fetch_genotypes(), genotypes(), phenotypes_byid(), phenotypes(), users()

Examples

## Not run: 
# Get all data
allphenotypes(df = TRUE)

# Output a list, then call the characterisitc of interest by 'id' or
# 'characteristic'
datalist <- allphenotypes()
names(datalist) # get list of all characteristics you can call
datalist[["ADHD"]] # get data.frame for 'ADHD'
datalist[c("mouth size", "SAT Writing")] # get data.frame for 'ADHD'

## End(Not run)

ropensci/rsnps documentation built on July 31, 2023, 11:11 a.m.