variableScatterplot: Variable scatter-plot

Description Usage Arguments Value Methods (by class) Examples

Description

The method draws the scatterplot of two numeric variables for each category of a categorical variable. If only one numeric variable accession (numPhvAcc_1) is provided, it draws the numeric variable values as the function of the respective subject indices. If both numeric variables (numPhvAcc_1 and numPhvAcc_2) are provided, it draws the values of the first variable as the function of the second. All variables should belong to the same study and have overlapping subjects. The created graph is saved as PDF and PNG files.

Usage

1
2
3
4
5
variableScatterplot(object, numPhvAcc_1, ...)

## S4 method for signature 'Study,character'
variableScatterplot(object, numPhvAcc_1, ...,
  numPhvAcc_2 = "", catPhvAcc = "", saveToDir = "", showPlot = TRUE)

Arguments

object

Study class object.

numPhvAcc_1

a character string. A dbGaP variable accession of the numeric variable type.

...

There are optional argument.

numPhvAcc_2

a character string. (optional) A dbGaP variable accession of the numeric variable type.

catPhvAcc

a character string. (optional) A dbGaP variable accession of the categorical variable type. This value is used only if the arguments of numPhvAcc_1 and numPhvAcc_2 are both provided.

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.

Value

a data frame. The data used for plotting.

Methods (by class)

Examples

1
2
3
4
5
6
7
8
9
## Not run: 

s <- Study(phsAcc = 'phs000001.v3.p1')
numv1 = 'phv00000027.v2'
numv2 = 'phv00053747.v2'
catv = 'phv00053757.v2'
variableScatterplot(s, numPhvAcc_1=numv1, numPhvAcc_2=numv2, catPhvAcc=catv)

## End(Not run)

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