Translate ggplot2 object to vegaspec
# S3 method for gg as_vegaspec(spec, single_view = FALSE, ...)
spec | An object to be coerced to |
---|---|
single_view |
|
... | Other arguments (attempt to future-proof) |
An object with S3 class vegaspec
To return a single-view spec, rather than a single-layer spec, use
single_view = TRUE
. Of course, this is effective only for ggplot objects
that have exactly one layer.