Package ggsubplot. February 15, 2013

Similar documents
User manual forggsubplot

Package gggenes. R topics documented: November 7, Title Draw Gene Arrow Maps in 'ggplot2' Version 0.3.2

Package ggmosaic. February 9, 2017

Package lvplot. August 29, 2016

Package ggrepel. September 30, 2017

Statistical transformations

Package ggseas. June 12, 2018

Getting started with ggplot2

Package cowplot. March 6, 2016

Package packcircles. April 28, 2018

Stat405. Displaying distributions. Hadley Wickham. Thursday, August 23, 12

Plotting with Rcell (Version 1.2-5)

Package superheat. February 4, 2017

Package crossword.r. January 19, 2018

Maps & layers. Hadley Wickham. Assistant Professor / Dobelman Family Junior Chair Department of Statistics / Rice University.

Package arphit. March 28, 2019

Facets and Continuous graphs

Package zebu. R topics documented: October 24, 2017

Introduction to Graphics with ggplot2

Classes 7-8 (4 hours). Graphics in Matlab.

Package ggimage. R topics documented: December 5, Title Use Image in 'ggplot2' Version 0.1.0

An introduction to ggplot: An implementation of the grammar of graphics in R

Package autocogs. September 22, Title Automatic Cognostic Summaries Version 0.1.1

Large data. Hadley Wickham. Assistant Professor / Dobelman Family Junior Chair Department of Statistics / Rice University.

A set of rules describing how to compose a 'vocabulary' into permissible 'sentences'

Package ggextra. April 4, 2018

Package plotluck. November 13, 2016

Package panelview. April 24, 2018

Package rollply. R topics documented: August 29, Title Moving-Window Add-on for 'plyr' Version 0.5.0

Package gridgraphics

Desktop Studio: Charts. Version: 7.3

ggplot2 basics Hadley Wickham Assistant Professor / Dobelman Family Junior Chair Department of Statistics / Rice University September 2011

Graphical critique & theory. Hadley Wickham

Package dotwhisker. R topics documented: June 28, Type Package

Package datasets.load

Package MRMR. August 29, 2016

Stat 849: Plotting responses and covariates

Package gtrendsr. August 4, 2018

Package pairsd3. R topics documented: August 29, Title D3 Scatterplot Matrices Version 0.1.0

Package ggqc. R topics documented: January 30, Type Package Title Quality Control Charts for 'ggplot' Version Author Kenith Grey

Package QCAtools. January 3, 2017

Desktop Studio: Charts

Package coefplot. R topics documented: February 15, Type Package. Title Plots Coefficients from Fitted Models. Version

Package ggiraphextra

The following presentation is based on the ggplot2 tutotial written by Prof. Jennifer Bryan.

Package nullabor. February 20, 2015

Package d3plus. September 25, 2017

Package ggimage. R topics documented: November 1, Title Use Image in 'ggplot2' Version 0.0.7

Package wethepeople. March 3, 2013

Package profvis. R topics documented:

Package abf2. March 4, 2015

Package docxtools. July 6, 2018

Error-Bar Charts from Summary Data

Package d3heatmap. February 1, 2018

Package TPD. June 14, 2018

Package hypercube. December 15, 2017

PC-MATLAB PRIMER. This is intended as a guided tour through PCMATLAB. Type as you go and watch what happens.

Package gtrendsr. October 19, 2017

Dr Richard Greenaway

Package grimport. R topics documented: February 20, 2015

Package narray. January 28, 2018

Package bootlr. July 13, 2015

Package jstree. October 24, 2017

Package geojsonsf. R topics documented: January 11, Type Package Title GeoJSON to Simple Feature Converter Version 1.3.

Stat 849: Plotting responses and covariates

Data Visualization. Module 7

EXST 7014, Lab 1: Review of R Programming Basics and Simple Linear Regression

Ggplot2 QMMA. Emanuele Taufer. 2/19/2018 Ggplot2 (1)

Package gridextra. September 9, 2017

INFS 2150 / 7150 Intro to Web Development / HTML Programming

Package io. January 15, 2018

HybridCheck User Manual

The diamonds dataset Visualizing data in R with ggplot2

Creating a Basic Chart in Excel 2007

Package pmg. R topics documented: March 9, Version Title Poor Man s GUI. Author John Verzani with contributions by Yvonnick Noel

Package Grid2Polygons

Data visualization with ggplot2

Package fbroc. August 29, 2016

Package kirby21.base

Lecture 09. Graphics::ggplot I R Teaching Team. October 1, 2018

Package grimport2. March 20, 2018

Package EnQuireR. R topics documented: February 19, Type Package Title A package dedicated to questionnaires Version 0.

Package reval. May 26, 2015

Package dgo. July 17, 2018

Package rplotengine. R topics documented: August 8, 2018

Package geomerge. July 31, 2018

Package PCADSC. April 19, 2017

Package ggloop. October 20, 2016

Package rafalib. R topics documented: August 29, Version 1.0.0

Reproducible Homerange Analysis

Visualizing Data: Customization with ggplot2

Package lazydata. December 4, 2016

Package Mondrian. R topics documented: March 4, Type Package

Package erp.easy. March 2, 2017

Econ 2148, spring 2019 Data visualization

Package statar. July 6, 2017

Lab5A - Intro to GGPLOT2 Z.Sang Sept 24, 2018

Package Numero. November 24, 2018

Package gfcanalysis. August 29, 2016

Package beanplot. R topics documented: February 19, Type Package

Transcription:

Package ggsubplot February 15, 2013 Maintainer Garrett Grolemund <grolemund@rice.edu> License GPL Title Explore complex data by embedding subplots within plots. LazyData true Type Package Author Garrett Grolemund <grolemund@rice.edu>, Hadley Wickham <h.wickham@gmail.com> ggsubplot makes it easy to embed customized subplots within larger graphics. Subplots may be used as a geom to explore interaction effects, spatial data, and hierarchical data. Subplots can also be used to explore big data without overplotting. Version 0.2.0 Imports ggplot2, plyr, proto, grid, scales, stringr Depends methods, R (>= 2.15) Collate aesply.r data.r geom_coxcomb.r geom_star.r geom_subplot.r geom_subplot2d.r ggsubplotclass.r ggsubplot_build.r merge_overlaps.r package.r ply_aes.r ref_box.r relclass.r rescalers.r sp_layer-class.r sp_layer_build.r util.r geom_freqstar.r Repository CRAN Date/Publication 2012-09-11 06:14:20 NeedsCompilation no 1

2 casualties R topics documented: casualties.......................................... 2 environment-class...................................... 3 geom_coxcomb....................................... 3 geom_freqstar........................................ 4 geom_star.......................................... 5 geom_subplot........................................ 6 geom_subplot2d....................................... 7 gg-class........................................... 9 ggplot-class......................................... 9 ggsubplot.......................................... 9 ggsubplot-class....................................... 10 interval_breaks....................................... 10 is.rel............................................. 11 is.sp_layer.......................................... 11 list-class........................................... 11 names_scales........................................ 12 nasa............................................. 12 ply_aes........................................... 12 propogate_aes........................................ 13 propogate_data....................................... 13 proto-class.......................................... 13 ref_box........................................... 14 ref_hline........................................... 14 ref_vline........................................... 15 rel.............................................. 16 remove_i.......................................... 16 rescale_01.......................................... 17 rescale_11.......................................... 18 rescale_2pi......................................... 19 sp_layer........................................... 20 sp_layer-class........................................ 20 unpanel........................................... 20 which_untrained...................................... 21 which_x........................................... 21 which_y........................................... 21 Index 22 casualties casualty data from the Afghan War Diary, lightly cleaned The Afghan War Diary is distributed by the WikiLeaks organization and available for download at http://www.wikileaks.org/wiki/afghan_war_diary,_2004-2010. Each row of the data # set corresponds to a single casualty (one person being injured or killed).

environment-class 3 environment-class environment S4 class environment S4 class geom_coxcomb Coxcomb glyphs geom_coxcomb draws the type of glyph commonly called a coxcomb plot or polar area plot, popularized by Florence Nightingale. geom_coxcomb(mapping = NULL, data = NULL, stat = "bin", position = "identity", npoints = 10, na.rm = FALSE,...) mapping data stat position npoints The aesthetic mapping, usually constructed with aes. Only needs to be set at the layer level if you are overriding the plot defaults. A layer specific dataset - only needed if you want to override the plot defaults The statistical transformation to use for this layer. The position adjustment to use for overlapping points in this layer the number of points to use when drawing the arcs with line segments. Defaults to 10. na.rm If FALSE (the default), removes missing values with a warning. If TRUE, silently removes missing variables.... other arguments passed on to layer. This can include aesthetics whose values you want to set, not map. See layer for more details. Aesthetics geom_coxcomb understands the following aesthetics x, y, colour, fill, size, linetype, weight, and alpha.

4 geom_freqstar Examples ## Not run: ## A single coxcomb ggplot(casualties) + geom_coxcomb(aes(angle = month, fill = month)) ## Coxcombs in an embedded plot ggplot(casualties) + map_afghanistan + geom_subplot2d(aes(lon, lat, subplot = geom_coxcomb(aes(angle = month, fill = month))), bins = c(15, 12), ref = NULL) + coord_map() ## End(Not run) geom_freqstar Frequency Star glyphs geom_freqstar draws the type of glyph commonly called a star plot, radar plot, or polar plot. geom_freqstar bins the data provided as the angle variable and then maps frequency statistics to the r aesthetic. Compare with geom_star geom_freqstar(mapping = NULL, data = NULL, stat = "bin", position = "identity", na.rm = FALSE,...) mapping data stat position The aesthetic mapping, usually constructed with aes. Only needs to be set at the layer level if you are overriding the plot defaults. A layer specific dataset - only needed if you want to override the plot defaults The statistical transformation to use for this layer. The position adjustment to use for overlapping points in this layer na.rm If FALSE (the default), removes missing values with a warning. If TRUE, silently removes missing variables.... other arguments passed on to layer. This can include aesthetics whose values you want to set, not map. See layer for more details. Aesthetics geom_coxcomb understands the following aesthetics x, y, colour, fill, size, linetype, weight, and alpha.

geom_star 5 geom_star Star glyphs geom_star draws the type of glyph commonly called a star plot, radar plot, or polar plot. geom_star(mapping = NULL, data = NULL, stat = "identity", position = "identity", na.rm = FALSE, r.zero = TRUE,...) mapping data stat position The aesthetic mapping, usually constructed with aes. Only needs to be set at the layer level if you are overriding the plot defaults. A layer specific dataset - only needed if you want to override the plot defaults The statistical transformation to use for this layer. The position adjustment to use for overlapping points in this layer na.rm If FALSE (the default), removes missing values with a warning. If TRUE, silently removes missing variables. r.zero logical. Should the origin of the star correspond to r = 0? If FALSE, origin corresponds to lowest value of r.... other arguments passed on to layer. This can include aesthetics whose values you want to set, not map. See layer for more details. Aesthetics geom_coxcomb understands the following aesthetics x, y, colour, fill, size, linetype, weight, and alpha. Examples ## Not run: ## A single star one_nasa <- nasa[nasa$id == "1-1", ] ggplot(one_nasa) + geom_star(aes(x = 0, y = 0, r = surftemp, angle = date, fill = mean(temperature)), r.zero = FALSE) ## Stars in an embedded plot ggplot(nasa) + map_americas + geom_subplot(aes(long, lat, group = id, subplot = geom_star(aes(x = 0, y = 0, r = surftemp, angle = date, fill = mean(surftemp)), r.zero = FALSE))) + coord_map() ## End(Not run)

6 geom_subplot geom_subplot Create a layer of embedded subplots Create a layer of embedded subplots geom_subplot(mapping, width = rel(0.95), height = rel(0.95), data = waiver(), x_scale = identity, y_scale = identity, position = "identity", reference = NULL, ply.aes = TRUE,.ref = FALSE) mapping width height data x_scale y_scale position reference An aesthetic mapping, usually constructed with aes. This mapping determines where in the major x and y axes each glyph will be position. Only x, y, group, and subplot aesthetics will be used. All other aesthetics will be ignored - consider placing them in the subplot s mapping instead. numeric or rel object. The width of each glyph. If width is numeric, the glyph will be drawn with a width equal to width units on the x axis. If width is of class rel, glyph will attempt to assign an inuitive width based on the number of total glyphs and their placement within the plot. The width can be scaled relative to this intuitive width by changing the value of the rel object. numeric or rel object. The height of each glyph. Height behaves the same way as width, but applies to the y dimension. The dataframe the layer should map to. geom_subplot inherits the global dataframe defined in ggplot. function. The scaling to use for the x axis within each glyph. If x_scale equals identity(default), the x limits within each glyph will correspond to the range of x across all glyphs. This aids comparison because each glyph will use the same scale. If x_scale equals free, each glyph will use its own x scale. The limits of this scale will be set to the range of x values in that glyph. function. y_scale behaves the same as x_scale but controls the scales for the y axis within each glyph. character. A string that specifies which position adjustment should be used. geom_subplot only recognizes "identity" and "merge". function. Function used to create reference objects for glyphs. If NULL, no reference objects are used. Reference objects are plotted on a layer beneath the glyphs. They provide a consistent frame of reference to aid comparisons between the glyphs. Functions that create reference objects include ref_box, ref_hline, and ref_vline.

geom_subplot2d 7 ply.aes.ref logical. If TRUE (default) aesthetics are calculated separately for each group, as with ply_aes. If FALSE aesthetics are calculated based on entire data set for the layer. internal argument used for plotting reference objects. Value an object of class sp_layer Examples ## Not run: ggplot(nasa) + map_americas + geom_subplot(aes(long, lat, group = id, subplot = geom_point(aes(surftemp, temperature), size = 1/4))) + coord_map() ## End(Not run) geom_subplot2d Bin data and visualize with a grid of subplots. geom_subplot bins data into a two dimensional grid and then visualizes the data within each bin with an embedded subplot. Mappings, stat, and parameters are applied consistently across subplots, but each subplot only uses the data that falls withn its 2d bin. geom_subplot2d(mapping, bins = 10, binwidth = NULL, breaks = NULL, data = waiver(), x_scale = identity, y_scale = identity, width.adjust = 0.95, height.adjust = 0.95, position = "identity", reference = ref_box(), ply.aes = TRUE,.ref = FALSE) mapping bins An aesthetic mapping, usually constructed with aes. This mapping should contain x, y, and subplot aesthetics. All other aesthetics will be ignored - consider placing them in the subplot aesthetics s mapping instead. The subplot aesthetic should be a layer or plot specification. For example, the subplot aesthetic could be the output of qplot or geom_point. Any data argument in the subplot aesthetic will be ignored, the subplot mapping will be applied to the data inherited by the geom_subplot2d layer. numeric. The number of bins to divide each major axis into. If bins is of length 2, the first number will be applied to the x axis and the second to the y. Defaults to 10.

8 geom_subplot2d binwidth breaks data x_scale y_scale width.adjust height.adjust position numeric. The binwidth to use when dividing the major x and y axes into bins. If set, binwidth will override the bins argument. If binwidth is of length 2, the first number will be applied to the x axis and the second to the y. Defaults to NULL. a vector of breaks or a function from the densityvis package (unpublished), such as interval_breaks. breaks determines which breaks are used to bin the x and y axes. If set, breaks will override the bins and binwidth arguments. If breaks is a list, the first element will be applied to the x axis and the second to the y. Defaults to NULL. The dataframe the layer should map to. geom_subplot2d inherits the global dataframe defined in ggplot. function. The scaling to use for the x axis within each glyph. If x_scale equals identity(default), the x limits within each glyph will correspond to the range of x across all glyphs. This aids comparison because each glyph will use the same scale. If x_scale equals free, each glyph will use its own x scale. The limits of this scale will be set to the range of x values in that glyph. function. y_scale behaves the same as x_scale but controls the scales for the y axis within each glyph. numeric. The proportion of horizontal space within a grid box that each subplot should occupy. Used to control overlapping and appearance. Each subplot is anchored to the bottom left corner of the grid box and then spans the proportion of the box specified by width adjust. numeric. The proportion of vertical space within a grid box that each subplot should occupy. Behaves the same as width.adjust. character. "identity" reference function. Function used to create reference objects for the embedded plots. If NULL, no reference objects are used. Reference objects are plotted on a layer beneath the subplots. They provide a consistent frame of reference to aid comparisons across subplots. Functions that create reference objects include ref_box, ref_hline, and ref_vline. By default, reference is set to ref_box, which creates the familiar mesh pattern associated with grids. ply.aes.ref Details logical. If TRUE (default) aesthetics are calculated separately for each subplot, as with ply_aes. If FALSE aesthetics are calculated based on entire data set for the layer. internal argument used for plotting reference objects. Any variables in the data set may be used as x and y axes to bin on. These major x and y axes need not correspond to the minor x and y axes within each subplot. Minor x and y axes are defined in the subplot aesthetic of geom_subplot2d. To allow interpretation, the major axes of a gridded layer should correspond to the x and y aesthetics for any other (non - gridded) layers in the plot. Value an object of class glayer

gg-class 9 Examples ## Not run: ggplot(casualties) + map_afghanistan + geom_subplot2d(aes(lon, lat, subplot = geom_bar(aes(victim,..count.., fill = victim))), bins = c(15,12), ref = NULL, width = rel(0.8)) + coord_map() ## End(Not run) gg-class gg S4 class gg S4 class ggplot-class ggplot S4 class ggplot S4 class ggsubplot Create a ggsubplot object glyph_plot gives a ggplot object the S4 class ggsubplot, see ggsubplot-class. ggsubplot denotes ggplot objects that contain extra information to be used to embed subplots when plotting. ggsubplot objects have similar, but different print and build methods than ggplot2 objects. ggsubplot(ggplot) ggplot a gg or ggplot object

10 interval_breaks ggsubplot-class ggsubplot class a ggsubplot object is a ggplot object that has been extended to include methods for embedding subplots when plotting. interval_breaks Pick breaks for interval (1d) bins. Specify either bins or binwidth. interval_breaks(bins = 10, binwidth = NULL, origin = NULL, range = NULL) bins binwidth origin range Desired number of bins Desired bin width Desired origin of first bin Range of values to use, if different to range of data. Value A function that takes a single parameter, a numeric x specifying the data for which breaks are needed, and returns a vector of breaks.

is.rel 11 is.rel is x a rel object? is x a rel object? is.rel(x) x an R object Value logical is.sp_layer Is an object (functionally) a sp_layer? Tests whether an object is or ever was a sp_layer. is.sp_layer(x) x an R object Value logical list-class list S4 class list S4 class

12 ply_aes names_scales Returns the first aes of a scale, to use as an identifier for the scale Returns the first aes of a scale, to use as an identifier for the scale names_scales(scales) scales a list of ggplot2 scales nasa Nasa data from the 2006 American Statistical Association Data Expo Nasa data from the 2006 American Statistical Association Data Expo ply_aes Compute aesthetics groupwise ply_aes causes the aesthetics of a layer to be computed groupwise. ply_aes implements the splitapply-combine strategy of data analysis in a graphical framework. It first splits a layer s data frame into subgroups, then evaluates the layers mappings separately within each group, and finally combines the results into a single data frame which is used to build the plot for rendering. ply_aes(layer,.vars = NULL) layer.vars a ggplot2 layer or sp_layer object. This layer s aesthetics will be computed groupwise, but the layer will remain the same in every other respect. variable names to group by (optional), stored as a character string Details Users may specify which groupings to use through the.vars argument. If this argument is left NULL, ply_aes will search for and use a group aes, a glyphing or gridding criteria (in a sp_layer), a facetting criteria, or any combination of these that it finds.

propogate_aes 13 propogate_aes Ensure each layer contains all aesthetic mappings that affect it. propogate_aes checks for aesthetics defined at the global level of a plot that affect a layer. Propogate_aes moves such aesthetics into the layer s mapping. propogate_aes(layer, plot_mapping) layer plot_mapping ggplot2 layer objects the global data set for a ggplot2 plot propogate_data Ensure each layer contains a data set propogate_data checks each layer for a data set. If none is found it assigns a copy of the plot level data set to the layer. propogate_data avoids the side effects of ggplot2:::map_layout, which performs a similar function. propogate_data(layers, plot_data) layers plot_data ggplot2 layer objects the global data set for a ggplot2 plot proto-class proto S4 class proto S4 class

14 ref_hline ref_box Reference box glyph ref_box creates a layer of reference boxes to be plotted behind a layer of glyphs. Each box spans the full width and height of the glyph. Reference boxes make it easier to determine the location of an object within a glyph and to compare objects across glyphs. Reference boxes can also convey information on their own through fill, colour, alpha, linetype, and (line) size mappings. By default the fill and colour parameters of a reference box match the grey and white color scheme of ggplot2 panels in theme_grey. ref_box(mapping = NULL, fill = "grey90", color = "white",...) mapping An aesthetic mapping, usually constructed with aes. fill The color, as a character string, to be used as the fill if fill is not specified in the mapping color The color, as a character string, to be used as the color if color is not specified in the mapping... other arguments to be used as parameters in the reference box layer Details ref_box is a second order function. It returns a function that can be used to create a layer of reference boxes with the specified mapping and parameters. The output of ref_box is intended to be passed as the reference argument for geom_subplot or geom_subplot2d. See Also ref_hline and ref_vline ref_hline Horizontal reference line glyph ref_hline creates a layer of horizontal reference lines to be plotted behind a layer of glyphs. Each line spans the full width of the glyph. The thickness of the line can be adjusted with the thickness argument. Reference lines make it easier to determine the location of an object within a glyph and to compare objects across glyphs. Reference lines can also convey information on their own through fill, colour, alpha, linetype, and (line) size mappings. By default the fill parameter of a reference line is set to white.

ref_vline 15 ref_hline(mapping = NULL, thickness = 0.2, fill = "white",...) mapping An aesthetic mapping, usually constructed with aes. thickness the thickness of the line as a proportion of the overall glyph height. Defaults to 0.2. fill The color, as a character string, to be used as the fill if fill is not specified in the mapping... other arguments to be used as parameters in the reference box layer Details ref_hline is a second order function. It returns a function that can be used to create a layer of reference lines with the specified mapping and parameters. The output of ref_hline is intended to be passed as the reference argument for geom_subplot or geom_subplot2d. See Also ref_box and ref_vline ref_vline Vertical reference line glyph ref_vline creates a layer of vertical reference lines to be plotted behind a layer of glyphs. Each line spans the full height of the glyph. The thickness of the line can be adjusted with the thickness argument. Reference lines make it easier to determine the location of an object within a glyph and to compare objects across glyphs. Reference lines can also convey information on their own through fill, colour, alpha, linetype, and (line) size mappings. By default the fill parameter of a reference line is set to white. ref_vline(mapping = NULL, thickness = 0.2, fill = "white",...) mapping An aesthetic mapping, usually constructed with aes. thickness the thickness of the line as a proportion of the overall glyph width. Defaults to 0.2. fill The color, as a character string, to be used as the fill if fill is not specified in the mapping... other arguments to be used as parameters in the reference box layer

16 remove_i Details ref_vline is a second order function. It returns a function that can be used to create a layer of reference lines with the specified mapping and parameters. The output of ref_vline is intended to be passed as the reference argument for geom_subplot or geom_subplot2d. See Also ref_box and ref_hline rel Make a rel class object rel class objects are used to specify the width and height of glyphs in geom_subplot calls. The numeric component of the rel object specifies the proportion of the relative width or height to use for the final width or height. The relative width or height of a glyph is calculated at the time a plot is built for rendering. It depends on the number of glyphs in a plot and their placement within the plot. rel(x) x numeric the proportion of the relative width or height to use as the final width or height Value an object of class rel remove_i replace I() with identity remove_i searches through an expression for the I function and replaces it with identity. remove_i is used when an aesthetic has been surrounded with I() to prevent groupwise calculation. remove_i(expr) expr an expression

rescale_01 17 rescale_01 rescale vectors to [0,1] rescale_01 rescales every vector in a list of vectors to the range [0, 1]. rescale_01 rescales the vectors as a group (instead of rescaling each vector independently). This is a helpful feature for rescaling related variables (such as xmin and xmax) without nullifying the difference between the two. rescale_01(xvars, xlim = NULL, zero = FALSE) xvars xlim zero a list of vectors NULL (default) or a numeric vector of length two that specifies the range of values to scale to [0, 1] logical. Should zero be added to the range before rescaling? Details If a vector is a character or factor vector, rescale_01 attempts to coerce it to numeric before scaling. The scale is determined by finding the range of values contained in the list of vectors and mapping it ot [0, 1]. If the full range of values to be scaled is not present in the vectors, users can specify the range to be scaled to [0,1] with the xlim argument. Values in the vectors will be rescaled as if they according to this range. Value a list of vectors See Also rescale_11, rescale_2pi

18 rescale_11 rescale_11 rescale vectors to [-1,1] rescale_11 rescales every vector in a list of vectors to the range [-1, 1]. rescale_11 rescales the vectors as a group (instead of rescaling each vector independently). This is a helpful feature for rescaling related variables (such as xmin and xmax) without nullifying the difference between the two. rescale_11(xvars, xlim = NULL, zero = FALSE) xvars xlim zero a list of vectors NULL (default) or a numeric vector of length two that specifies the range of values to scale to [-1, 1] logical. Should zero be added to the range before rescaling? Details If a vector is a character or factor vector, rescale_11 attempts to coerce it to numeric before scaling. The scale is determined by finding the range of values contained in the list of vectors and mapping it ot [-1, 1]. If the full range of values to be scaled is not present in the vectors, users can specify the range to be scaled to [-1,1] with the xlim argument. Values in the vectors will be rescaled as if they according to this range. Value a list of vectors See Also rescale_01, rescale_2pi

rescale_2pi 19 rescale_2pi rescale vectors to [0, 2 * pi] rescale_2pi rescales every vector in a list of vectors to the range [0, 2 * pi] (e.g, for working with radians). rescale_2pi rescales the vectors as a group (instead of rescaling each vector independently). This is a helpful feature for rescaling related variables (such as xmin and xmax) without nullifying the difference between the two. rescale_2pi(xvars, xlim = NULL, zero = FALSE) xvars xlim zero a list of vectors NULL (default) or a numeric vector of length two that specifies the range of values to scale to [0, 2 * pi] logical. Should zero be added to the range before rescaling? Details If a vector is a character or factor vector, rescale_11 attempts to coerce it to numeric before scaling. The scale is determined by finding the range of values contained in the list of vectors and mapping it to [0, 2 * pi]. If the full range of values to be scaled is not present in the vectors, users can specify the range to be scaled to [0, 2 * pi] with the xlim argument. Values in the vectors will be rescaled as if they according to this range. Value a list of vectors See Also rescale_01, rescale_11

20 unpanel sp_layer Create a sp_layer object sp_layer gives a ggplot2 layer object the S4 class sp_layer, see sp_layer-class. ggplot layer objects are usually non-specific proto class objects. A layer should contain an embed variable before being given the class sp_layer. See the function bodies of geom_subplot and geom_subplot2d for examples. sp_layer(layer) layer a proto object that can be used as a layer by the ggplot2 package (i.e, ggplot() + layer should return a graph). sp_layer-class sp_layer class sp_layers are layers made with ggsubplot methods. They are equivalent to the layers made by ggplot2 functions in all ways except that they contain extra information that is used to divide the data into subplots and locate those subplots witihn the layer when plotting. unpanel Format data from a facet plot to use in a ggsubplot plot unpanel replaces the PANEL variable of a data frame with a GLYPH variable. It adjusts the data frame s group variable to retain the grouping information provided by the PANEL variable. unpanel(df) df A data frame. Should be the output of a facetted plot built with ggplot_build Value A modified data frame. See Details.

which_untrained 21 which_untrained find scales that have no range yet find scales that have no range yet which_untrained(scales) scales A list of ggplot2 scales which_x find x scale which_x picks out the scale that controls x from a list of scales which_x(scales) scales A list of ggplot2 scales which_y find y scale which_y picks out the scale that controls y from a list of scales which_y(scales) scales A list of ggplot2 scales

Index Topic data casualties, 2 nasa, 12 +,gg,sp_layer-method (sp_layer-class), 20 +,ggplot,sp_layer-method (sp_layer-class), 20 +,ggsubplot,sp_layer-method (sp_layer-class), 20 [,sp_layer-method (sp_layer-class), 20 [<-,sp_layer-method (sp_layer-class), 20 $,sp_layer-method (sp_layer-class), 20 $<-,sp_layer-method (sp_layer-class), 20 aes, 3 7, 14, 15 c,sp_layer-method (sp_layer-class), 20 casualties, 2 environment (environment-class), 3 environment-class, 3 free, 6, 8 free (rescale_01), 17 geom_coxcomb, 3 geom_freqstar, 4 geom_point, 7 geom_star, 4, 5 geom_subplot, 6, 14 16, 20 geom_subplot2d, 7, 14 16, 20 gg (gg-class), 9 gg-class, 9 ggplot, 6, 8 ggplot (ggplot-class), 9 ggplot-class, 9 ggplot2, 20 ggplot_build, 20 ggsubplot, 9 ggsubplot-class, 10 ggtransform,sp_layer-method (sp_layer-class), 20 I, 16 identity, 6, 8, 16 interval_breaks, 10 is.rel, 11 is.sp_layer, 11 layer, 3 5 list (list-class), 11 list-class, 11 ls,sp_layer-method (sp_layer-class), 20 names_scales, 12 nasa, 12 ply_aes, 7, 8, 12 print,ggsubplot-method (ggsubplot-class), 10 propogate_aes, 13 propogate_data, 13 proto, 20 proto (proto-class), 13 proto-class, 13 qplot, 7 ref_box, 6, 8, 14, 15, 16 ref_hline, 6, 8, 14, 14, 16 ref_vline, 6, 8, 14, 15, 15 rel, 6, 16 remove_i, 16 rep,sp_layer-method (sp_layer-class), 20 rescale_01, 17, 18, 19 rescale_11, 17, 18, 19 rescale_2pi, 17, 18, 19 show,ggsubplot-method (ggsubplot-class), 10 22

INDEX 23 show,sp_layer-method (sp_layer-class), 20 sp_layer, 20 sp_layer-class, 20 theme_grey, 14 unpanel, 20 which_untrained, 21 which_x, 21 which_y, 21