View source: R/Standardization.R
log_plot | R Documentation |
Save a copy of the plot, a current dollars csv, and an excel copy
log_plot(
plot,
df,
filename,
xlsx,
sheet,
path = "..\\output",
second_path = NA,
width = 6.5,
height = 3.5,
output_doc_svg = TRUE,
output_doc_png = FALSE,
slide_width = 13,
slide_height = 5.5,
output_slide_svg = FALSE,
slide_size = 20,
output_slide_png = FALSE,
suppress_doc_svg_text = NA,
startRow = 1,
startCol = NA,
format = TRUE,
x_var = NA,
y_var = NA,
var_list = NA,
csv_then_year = TRUE,
excel_then_year = TRUE,
excel_y_var = FALSE,
excel_share = FALSE,
excel_formulas = FALSE,
hist_year = 2020,
cur_year = 2023,
include_YTD = TRUE,
group_unlabeled_facets = FALSE,
num_format = "0.00,,,\"B\""
)
plot |
a ggplot object |
df |
the underlying data |
filename |
the name for the files, excluding extension |
xlsx |
the excel file to output to |
sheet |
the sheet to use in excel, typically shorter than the name |
group_unlabeled_facets |
Whether to all unlabeled facets (but not colors) into a single line |
path="..\output\" |
what directory for the output |
second_path=NA |
for saving to a second location to automatically |
width=6.5 |
Width for the plot in inches |
height=3.5 |
Height for the plot in inches |
output_doc_svg=TRUE |
GGsave a svg of the graph for a document? |
output_doc_png=FALSE |
GGsave a png of the graph for a document? |
suppress_doc_svg_text=NA |
Specify which text to remove for output_doc plots "title" for titles, "caption" for captions, TRUE/"both" for both. |
startRow=1 |
Start row for excel output |
startCol=NA |
Start column for excel output |
format=TRUE |
Format the data rather then listing the df directl |
x_var=NA |
Override option for x_var |
y_var=NA |
Override option for y_var |
var_list=NA |
Override option for what variables to include in addition to x_var and y_var, also sets arrangement order. |
csv_then_year=TRUE |
Override the graphed y_var to include nominal dollars in csv output |
excel_then_year=TRUE |
Override the graphed y_var to include nominal dollars in excel output |
excel_y_var=FALSE |
Include the graphed y_var (or over) |
excel_share=FALSE |
Include percent shares for the y_var for each of the facets |
excel_formulas=FALSE |
Create formulas to accompany the table |
hist_year=2020 |
Historical anchor to include in summary stats |
cur_year=2023 |
Most recent complete year to include in summary stats |
YTD=TRUE |
Include formulas for cur_year+1 if excel_formulas is true. |
group_unlabeled_facets=FALSE |
Combine all unlabeled facet categories into a single line in the data. |
num_format="0.00 , \"B\"" |
How to format data values, default "0.00,,,\"B\"" |
no value
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.