graphicsHelpers: Interactive interface to ggplot2

Description Usage Arguments Value Examples

Description

Provides a menu selection system (via manipulate) so that the variables for different aspects of a plot can be selected interactively. The ggplot2 command for generating the plot currently being displayed is copied to the console, whence it can be copied to a document for later direct, non-interactive use.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
scatterGraphHelper(data)

distributionGraphHelper(data, format = "histogram", default = format,
  system = "ggplot2", show = FALSE, title = "", ...)

barGraphHelper(data)

densityGraphHelper(...)

USMap(data = NULL, key = NULL, fill = NULL, ...)

WorldMap(data = NULL, key = NULL, fill = NULL, ...)

Arguments

data

Dataframe containing the variables that might be used in the plot.

format

for density plots, the format to use: "histogram", "density", "frequency polygon"

default

for backward compatibility

system

the graphics system to use. Use "ggplot2"

show

see mosaic::mUniPlot

title

a title to put on the graphic

...

reserved for future use.

key

name of variable holding the state or country ID(for mWorldMap and mUSMap only)

fill

name of variable to use for the cholopleth map (for mWorldMap and mUSMap only)

Value

Nothing. Just for plotting side effects.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
  scatterGraphHelper(HappinessIndex) # the use menu to map variables to aesthetics
  Counts <-
    Minneapolis2013 %>%
    group_by(First, Precinct) %>%
    summarise(vote_count=n())
  barGraphHelper(Counts)
  WorldMap(CountryData, key=country, fill=fert)

## End(Not run)

DataComputing/DataComputing documentation built on May 6, 2019, 1:39 p.m.