Title: | Automatically save data associated with a 'ggplot2' plot |
---|---|
Description: | Automatically create a file with the data used to create a 'ggplot2' plot. Each layer's data is saved in its own csv file inside a compressed file. These files can then be published as supplemental material so that other people can re-do your plots without the need of digitising them. Because the only data that is saved is the one that is shown in the plot, there are fewer privacy concerns. |
Authors: | Elio Campitelli [cre, aut] |
Maintainer: | Elio Campitelli <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.0.0.9000 |
Built: | 2024-10-26 03:09:50 UTC |
Source: | https://github.com/eliocamp/ggdatasaver |
Takes a ggplot and saves a zip file with a single csv file for each layer of the plot with the data used by said layer
save_plot_data(plot, name = "plot", dir = ".")
save_plot_data(plot, name = "plot", dir = ".")
plot |
A ggplot2 plot. |
name |
The name used as file name. |
dir |
Directory where to put the file. If NUL In general, you don't need to call this function
explicitly, since it will be used automatically by knitr
if the plot data directory is set (see Paraphrasing Voltaire, if |
Set the directory where data assocaited with plots will be saved.
save_plot_data_in(dir = NULL)
save_plot_data_in(dir = NULL)
dir |
A directory where to save plot data. If NULL, plot data will not be saved. This functions sets the |