Skip to contents

Coerces ggplot mapping to 'data.frame'.

Usage

# Default S3 method
mapframe(x, ...)

Arguments

x

mapping

...

ignored

Value

data.frame

Details

* 'aesthetic' captures each aesthetic label as a string. * 'map' captures each map (typ. a column name) as a string.

Examples

library(ggplot2)
mapframe(ggplot(mapping = aes(conc, time, shape = factor(dose)))$mapping)
#>   aesthetic          map
#> 1         x         conc
#> 2         y         time
#> 3     shape factor(dose)