build_df {ggplot} | R Documentation

## Build data frame

### Description

Build data frome for a plot with given data and ... (dots) arguments

### Usage

    build_df(plot, data, aesthetics)

### Arguments

`plot` | plot object
`data` | data frame to use
`aesthetics` | extra arguments supplied by user that should be used first

### Details

Depending on the arguments supplied to `plot_add` we need to stitch together a data frame using the defaults from plot$defaults where the user hasn't explicitly specified otherwise.

Arguments in dots are evaluated in the context of `data` so that column names can easily be references.

Also makes sure that it contains all the columns required to correctly place the output into the row+column structure defined by the formula, by using `expand.grid.df` to add in extra columns if needed.

### Author(s)

Hadley Wickham <h.wickham@gmail.com>

### Examples

[Package ggplot version 0.2.2 Index]