saveGapPlot: (internal) Save dbGaP data plot to file

Description Usage Arguments Value Methods (by class) Examples

Description

The method takes the ggplot graph object as an input, and save the graph to PDF and PNG files.

Usage

1
2
3
4
5
saveGapPlot(object, ...)

## S4 method for signature 'Commons'
saveGapPlot(object, ..., plotObj, plotType, phvAccNameCombo,
  saveToDir = "", showPlot = T)

Arguments

object

Commons class object.

...

There are optional arguments.

plotObj

a ggplot image object. The resulting image object from a ggplot function all.

plotType

a character string. Type of the plot with the possible value of 'boxplot', 'scatterplot', or 'histogram', etc.

phvAccNameCombo

a character string. The concatenated string of a variable accession and name. For example, "phv00053747.v2_LNUCSCORE_phv00053764.v2_LPSC". It is used for naming the saved image files.

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; If FALSE, not show the created graph. The created graph is saved as files regardless.

Value

a character list. The full paths to the saved plot files

Methods (by class)

Examples

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

c <- Commons()
accNameCombo = 'phv00053747.v2_LNUCSCORE_phv00053764.v2_LPSC'
saveGapPlot(c, plotObj, plotType = 'boxplot', phvAccNameCombo = accNameCombo) 

## End(Not run)

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