gg_barplot: A barplot with counts above bars.

Description Usage Arguments Examples

View source: R/gg_barplot.R

Description

A simple 'ggplot2' barplot with counts above bars.

Usage

1
2
3
4
5
6
7
gg_barplot(x, data, alpha = 1, color = "black", drop_NA = FALSE, ...)

## S3 method for class 'hyperSpec'
gg_barplot(x, data, alpha = 1, color = "black", drop_NA = FALSE, ...)

## Default S3 method:
gg_barplot(x, data, alpha = 1, color = "black", drop_NA = FALSE, ...)

Arguments

x

(string) A name of factor variable in the data frame.

data

A data frame.

alpha

(number from 0 to 1) Level of transperency. Default is 1 (not transperent).

color

(string) Edge color of bars.

drop_NA

(logical) Should NA values be dropped? Default is FALSE.

...

(not used yet)

Examples

1
2
3
4
5
6
7
8
#' library(spPlot)

#`data` is a data frame:
gg_barplot("cyl", mtcars)


# data` is a `hyperSpec` object:
gg_barplot("class", Spectra2)

GegznaV/spPlot documentation built on April 29, 2020, 11:06 p.m.