Description Usage Arguments Details Value
The data used to generate a plot is an essential requirement for a
reproducible graphic. This is somewhat available from a ggplot grob
(in raw form) but it it not easily accessible, and isn't named the same way
as the original call.
1 | recover_data(x, supp = TRUE)
|
x |
A ggghost object from which to extract the data. |
supp |
(logical) Should the supplementary data be extracted also? |
This function retrieves the data from the ggghost object as it was when it was originally called.
If supplementary data has also been attached using supp_data
then this will also be recovered (if requested).
When used iteractively, a warning will be produced if the data to be extracted exists in the workspace but not identical to the captured version.
A data.frame
of the original data, named as it was when used
in ggplot(data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.