esquisser: An add-in to easily create plots with ggplot2

Description Usage Arguments Value Examples

View source: R/esquisser.R

Description

An add-in to easily create plots with ggplot2

Usage

1
2
3
4
5
6
esquisser(
  data = NULL,
  coerce_vars = getOption(x = "esquisse.coerceVars", default = TRUE),
  disable_filters = getOption(x = "esquisse.disable_filters", default = FALSE),
  viewer = getOption(x = "esquisse.viewer", default = "dialog")
)

Arguments

data

a data.frame, you can pass a data.frame explicitly to the function, otherwise you'll have to choose one in global environment.

coerce_vars

If TRUE allow to coerce variables to different type when selecting data.

disable_filters

Logical. Disable the menu allowing to filter data used.

viewer

Where to display the gadget: "dialog", "pane" or "browser" (see viewer).

Value

code to reproduce chart.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
if (interactive()) {
# Launch with :
esquisser(iris)
# If in RStudio it will be launched by default in dialog window
# If not, it will be launched in browser

# Launch esquisse in browser :
esquisser(iris, viewer = "browser")

# You can set this option in .Rprofile :
options("esquisse.viewer" = "viewer")
# or
options("esquisse.viewer" = "browser")

# esquisse use shiny::runApp
# see ?shiny::runApp to see options 
# available, example to use custom port:

options("shiny.port" = 8080)
esquisser(iris, viewer = "browser")

}

dtsonipmph/esquisse documentation built on Sept. 14, 2020, 9:34 a.m.