variableBoxplot: Variable boxplot

Description Usage Arguments Value Methods (by class) Examples

Description

The method draws the box-and-whisker plot given the accession of either a numeric variable alone or a numeric plus a categorical variable. The boxplot is drawn with the numeric variable as the function of each category of the categorical variable, respectively. When categorical variable accession is not provided, the boxplot is drawn with the numeric variable as the function of the respective subject indices. The resulting graph is saved as PDF and PNG files.

Usage

1
2
3
4
5
variableBoxplot(object, numPhvAcc, ...)

## S4 method for signature 'Study,character'
variableBoxplot(object, numPhvAcc, ...,
  catPhvAcc = "", saveToDir = "", showPlot = T)

Arguments

object

Study class object.

numPhvAcc

a character string. The dbGaP accession of a numeric variable.

...

There are optional arguments.

catPhvAcc

a character string. (optional) The dbGaP accession of a categorical variable.

saveToDir

a character string. (optional) The path to the directory where the plot PDF file is saved. If not provided, the file is saved in the 'temp' directory under the user project directory.

showPlot

a logical value. (optional) If TRUE (default), shows the created graph; Not show if FALSE. The graph is always saved in PDF and PNG files regardless shown or not.

Value

a data frame. The data used for plotting.

Methods (by class)

Examples

1
2
3
4
5
6
## Not run: 

s <- Study(phsAcc = 'phs000001.v3.p1')
variableBoxplot(s, numPhvAcc = 'phv00000027.v2', catPhvAcc = 'phv00000032.v2')

## End(Not run)

jameslhao/dbgapr_dev documentation built on May 8, 2019, 11:03 p.m.