phewasDT: Wrapper to create a browsable datatable

Description Usage Arguments Details Author(s) See Also Examples

View source: R/phewasDT.R

Description

This function returns a DT from the pacakge DT that has commonly used columns in an easy to browse format.

Usage

1
phewasDT(results, addPhecodeInfo=T, OR.digits=2, p.digits=3, ...)

Arguments

results

The results data frame from phewas.

addPhecodeInfo

Add the phecode information? Default is TRUE, which works with a phecode PheWAS. FALSE requires the inclusion of a "description" column.

OR.digits

Digits after the decimal place for the odds ratio (passed as the digits parameter to round). Default is 2.

p.digits

Digits after the decimal place for the p-value (passed as the digits parameter to round). Default is 3.

...

Parameters to pass to datatable

Details

This function is a short wrapper to create an easily browsable datatable using the package DT. It has few options, but this function serves as an instructive example as the interior calls of the function can be easily adapted to suit other purposes.

Author(s)

Robert Carroll

See Also

createPhewasTable

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#Generate some example data
ex=generateExample(hit="335")
#Extract the two parts from the returned list
id.icd9.count=ex$id.icd9.count
genotypes=ex$genotypes
#Create the PheWAS code table- translates the icd9s, adds exclusions, and reshapes to a wide format
phenotypes=createPhewasTable(id.icd9.count)
#Run the PheWAS
results=phewas(phenotypes,genotypes,cores=4)
#Create a quick datatable for results review
phewasDT(results)

PheWAS/PheWAS documentation built on Nov. 16, 2018, 6:28 p.m.