chartPlots {GeneAnswers} | R Documentation

## Pie Chart and Bar Plots

### Description

Make pie chart and bar plot based on the given data frame.

### Usage

    chartPlots(x, chartType = c("pieChart", "barPlot", "all"), specifiedCols = c("genes in Category"), top = 5, newWindow=TRUE, ...)

### Arguments

`x` | a data frame to be used for pie chart and box plot
`chartType` | plot type, "pieChart", "barPlot" or both could be specified.
`specifiedCols` | the column will be used to be represented.
`top` | number to specify how many first categories will be drawn.
`newWindow` | logic, determine whether draw on a new canvas.
`...` | additional arguments passed to piechart or barplot.

### Details

chartType could be pie chart, bar plot or both (parameter is "all"). specifiedCols is the column that will be used to plot. It could be column name or number. If chartType is set to 'all', the barplot will be drawn on a new canvas whatever newWindow is set to TRUE or FALSE.

### Value

A pie chart and/or barplot are generated depends on specification.

### Author(s)

Gang Feng, Pan Du and Simon Lin

### References

Feng, G., Du, P., Krett, N., Tessel, M., Rosen, S., Kibbe, W.A. and Lin, S.M., 'A collection of bioconductor methods to visualize gene-list annotations', BMC Research Notes 2010, 3:10

### Examples

    x <- matrix(c(6,9,3,30,13,2,15,20), nrow = 4, ncol=2, byrow=FALSE,
                   dimnames = list(c("group1", "group2", "group3", "group4"),
                                   c("value1", "value2")))
    chartPlots(x, chartType='all', specifiedCol = "value2", top = 3)

[Package GeneAnswers version 2.26.0 Index]