Create the rda package for a plot or table
create_rda(
object,
topic_label,
fig_or_table,
dat,
dir = getwd(),
year = format(as.POSIXct(Sys.Date(), format = "%YYYY-%mm-%dd"), "%Y"),
ref_line = "msy",
scale_amount = 1,
unit_label = "mt",
table_df = NULL
)Table or plot object
A string that names the object
A string identifying if the object is a "table" or "figure"
Data frame containing data which will fill in captions and alternative text for the object
Directory to where the rda will be saved
Default: the working directory (`getwd()`)
Assessment year
Default: the current year
Reference line value
Default: "msy"
Options: Including, but not limited to: "msy", "target", "unfished"
A number describing how much to scale down the quantities shown on the y axis. For example, scale_amount = 100 would scale down a value from 500,000 –> 5,000. This scale will be reflected in the y axis label.
Default: 1
A string containing a unit label for the y-axis
Default: "mt"
The data frame that the table will be made into for purposes of exporting a latex formatted table.
An rda package for a plot or table object. Requires an object from the R environment such as a ggplot or flextable object.
[export_rda()], [extract_caps_alttext()]
if (FALSE) { # \dontrun{
create_rda(
object = my_plot,
topic_label = "my_plot",
fig_or_table = "figure",
dat = my_data,
dir = "path/to/save"
)
} # }