save_tables | R Documentation |
Systematically save your report tables for your report
save_tables(
table_raw = NULL,
table_print = NULL,
list_tables = c(),
header = "",
footnotes = "",
filename0 = "x",
cnt_chapt_content = "001",
cnt = "1",
path = NULL,
output_type = c("csv"),
type = "Table",
alttext = "",
filename_desc = "",
nickname = "",
message = FALSE
)
table_raw |
Optional. The data.frame that has no rounding and no dividing of numbers (good to save this for record keeping). Default = NA. |
table_print |
The data.frame as table will be seen in the report. |
list_tables |
Save tables in a list |
header |
The name and title of the figure. Default = "". |
footnotes |
Any footnote you want attached to this figure. |
filename0 |
The filename set at the begining of the chapter |
cnt_chapt_content |
The order number that this exists in the chapter. |
cnt |
The figure number |
path |
The path the file needs to be saved to. Default = "NULL", meaning it wont save anything and will override all other saving elements. |
output_type |
Default = c("csv"). Can be anything supported by utils::write.table. |
type |
Default = "Table", but can be anything that the element needs to be called (e.g., "Graphic", "Fig.", "Graph") to fit in the phrase "Table 1. This is my spreadsheet!". |
alttext |
String with what the alternative text is. |
filename_desc |
Additional description text for the filename that will be added at the name of file before the filename extention, before the "_raw" or "_print". Default = "". Can be use to add a species name, location, or anything else that would make it easier to know what that file shows. |
nickname |
A unique name that can be used to identify the figure so it can be referenced later in the report. |
message |
TRUE/FALSE. Default = FALSE. If TRUE, it will print information about where your plot has been saved to. |
# Select data and make plot
table_raw<-data.frame(x = rnorm(n = 10),
y = rnorm(n = 10),
col = rep_len(x = c("a", "b"), length.out = 5))
table_print <- table_raw
table_print[,c("x", "y")] <- NMFSReports::mod_number(table_print[,c("x", "y")],
divideby = 1,
comma_seperator = TRUE,
digits = 2)
save_tables(table_raw = table_raw,
table_print=table_print,
header = "Here is a table!",
footnote = "A footnote for this table!")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.