mPlots: 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
mScatter(dat)

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

mBar(dat)

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

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

Arguments

data

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

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: 
  mScatter(HappinessIndex) # the use menu to map variables to aesthetics
  Counts <-
    Minneapolis2013 %>%
    group_by(First, Precinct) %>%
    summarise(vote_count=n())
  mBar(Counts)
  mWorldMap(CountryData, key=country, fill=fert)

## End(Not run)

dtkaplan/DCFinteractive documentation built on May 15, 2019, 4:58 p.m.