Convenience dispatcher: routes ggplots to save_plot() and data frames /
lists to save_data(), choosing by the object type. Handy at the end of a
pipe when you do not want to think about which saver to call.
Arguments
- x
A ggplot, a data frame, or a (named) list of data frames.
- path
Output path; the extension picks the format.
NULL(default) writesplot.pngordata.csv. A bare file name lands inezrsurvey-outputs/(created on demand); a path naming a directory ("./x.png","charts/x.png", anything absolute) is used exactly as given. See theoutput_diroption.- ...
Passed to
save_plot()orsave_data().
See also
Other save:
export_summary_xlsx(),
export_xlsx(),
save_data(),
save_plot()
Examples
tmp_csv <- tempfile(fileext = ".csv")
calc_percentage(podracing_survey, demo_gender) %>% save_output(tmp_csv)
# \donttest{
tmp_png <- tempfile(fileext = ".png")
plot_bars(calc_percentage(podracing_survey, demo_gender)) %>% save_output(tmp_png)
# }
