ggErrorBar: Make an interactive bar plot with error bar

Description Usage Arguments Value Examples

View source: R/ggErrorBar.R

Description

Make an interactive bar plot with error bar

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
ggErrorBar(
  data,
  mapping,
  interactive = FALSE,
  digits = 1,
  mode = 2,
  errorbar = "se",
  use.label = TRUE,
  use.labels = TRUE
)

Arguments

data

A data.frame

mapping

Set of aesthetic mappings created by aes or aes_.

interactive

A logical value. If TRUE, an interactive plot will be returned

digits

An integer indicating the number of decimal places

mode

if 2, two-sided error bar will be displayed, if 1 one-sided errorbar will be displayed

errorbar

which value is displayed with errorbar :"se" or "sd"

use.label

Logical. Whether or not use column label in case of labelled data

use.labels

Logical. Whether or not use value labels in case of labelled data

Value

An interactive catepillar plot

Examples

1
2
3
4
require(ggplot2)
require(ggiraph)
ggErrorBar(mpg,aes(x=drv,y=cty))
ggErrorBar(mpg,aes(x=drv,y=hwy,color=cyl),mode=1,interactive=TRUE,errorbar="sd")

Example output

Loading required package: ggplot2
Loading required package: ggiraph
Warning messages:
1: In qt(conf.interval/2 + 0.5, datac$n - 1) : NaNs produced
2: Removed 1 rows containing missing values (geom_errorbar). 

ggiraphExtra documentation built on Oct. 23, 2020, 7:39 p.m.