Learn R Programming

rsnps (version 0.6.0)

phenotypes: Get openSNP phenotype data for one or multiple users.

Description

Get openSNP phenotype data for one or multiple users.

Usage

phenotypes(userid = NA, df = FALSE, ...)

Value

List of phenotypes for specified user(s).

Arguments

userid

ID of openSNP user.

df

Return data.frame (TRUE) or not (FALSE). Default: FALSE

...

Curl options passed on to crul::HttpClient

See Also

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

Examples

Run this code
if (FALSE) {
phenotypes(userid = 1)
phenotypes(userid = "1,6,8", df = TRUE)
phenotypes(userid = "1-8", df = TRUE)

# coerce to data.frame
library(plyr)
df <- ldply(phenotypes(userid = "1-8", df = TRUE))
head(df)
tail(df)

# pass on curl options
phenotypes(1, verbose = TRUE)
}

Run the code above in your browser using DataLab