R/write_objects_list.R
write_objects_list.Rd
Write a list of tables (data frames) and plots (ggplots
; as used by fasstr
) into a directory. Objects
that are not class "data.frame" or "gg" will not be saved. Each table and plot will be named by the object name in the list.
write_objects_list(
list,
folder_name,
table_filetype,
plot_filetype,
width,
height,
units = "in",
dpi = 300
)
List of data frames and plots to write to disk.
Name of folder to create on disk (if it does not exist) to write each plot from list.
If using combined_pdf
argument, then it will be the name of the PDF document.
Table file type to write. One of 'csv'
, 'xls'
, or 'xslx'
.
Image type to write. One of 'png'
, 'eps'
, 'ps'
, 'tex'
, 'pdf'
, 'jpeg'
,
'tiff'
, 'bmp'
, or 'svg'
. Image type will be overwritten if using combined_pdf
is used.
Numeric plot width in units
. If not supplied, uses the size of current graphics device.
Numeric plot height in units
. If not supplied, uses the size of current graphics device.
Character string plot height and width units, one of 'in'
, 'cm'
, or 'mm'
. Default 'in'
.
Numeric resolution of plots. Default 300
.
if (FALSE) {
# Working examples:
# Example list of tables and plots to save
frequency <- compute_annual_frequencies(station_number = "08NM116")
# Write objects in a folder
write_objects_list(list = frequency,
folder_name = "Frequency Analysis",
table_filetype = "xlsx",
plot_filetype = "png")
}