knitr::opts_chunk$set(
  collapse = TRUE,
  results = "asis",
  echo = FALSE,
  comment = "#>",
  out.width = "100%"
)
IS_README <- TRUE

gglabelr

Built with Shiny

A shiny gadget for interactively annotating a ggplot. Currently supports:

Installation

You can install the development version of the package via GitHub:

devtools::install_github('jhelvy/gglabelr')

Usage

First, load the libraries and create a plot using ggplot

library(gglabelr)
library(ggplot2)

p <- ggplot(mpg, aes(x = hwy, y = displ)) +
    geom_point()

Use the gglabelr() function to interactively annotate the plot:

gglabelr(p)

Copy the code to produce the annotations in the "Get the code" tab. The code will also print to the console when you close the app by pressing the "done" button.

Author, Version, and License Information

Citation Information

If you use this package for in a publication, I would greatly appreciate it if you cited it. You can get the citation information by typing citation("gglabelr") into R:

citation("gglabelr")


jhelvy/gglabelr documentation built on Dec. 7, 2020, 11:56 a.m.