Learn R Programming

g2r (version 0.1.0)

fig_bin: Bins

Description

Add bins based on x, and y.

Usage

fig_bin(g2, ..., type = c("rectangle", "hexagon"), bins = c(10, 5),
  size_count = TRUE, data = NULL, inherit_asp = TRUE, name = NULL)

Arguments

g2

An object of class g2r as returned by g2r.

...

Any option, aesthetic (asp), or animation (Animation).

type

Type of bins to create.

bins

A vector or list defining the bin size.

size_count

Whether to size the bins by count.

data

A data.frame containing data to chart or a list.

inherit_asp

Whether to inherit aspects from g2r.

name

Name of figure, useful to apply functions to specific figures.

Details

Note that the function adds an aspect count which can be used, (see example).

Examples

Run this code
# NOT RUN {
# issues warning in interactive session 
# }
# NOT RUN {
g2(gaus, asp(x, y)) %>% 
  fig_bin(type = "hexagon")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab