knitr::opts_chunk$set(echo = FALSE, warning = FALSE, error = FALSE, message = FALSE)
header <- "Example figure. " nickname <- "fig_example" width <- 6 height <- 6 figure <- ggplot2::ggplot(mapping = aes(x = x, y = y), data = data.frame(x = 1, y = 1)) + ggplot2::geom_point() # save figure res <- knitr::knit_child( text = knitr::knit_expand( file = system.file("rmd/_child_save_fig.Rmd", package = "NMFSReports")), quiet = TRUE ) list_figures[nickname][[1]]$res <- res <- paste0(" ",res," ")
header <- "Example table. " nickname <- "tab_example" table_raw <- data.frame(x = 1, y = 1) table_print <- flextable::flextable(table_raw) table_print <- NMFSReports::theme_flextable_nmfstm(table_print) # save table res <- knitr::knit_child( text = knitr::knit_expand( file = system.file("rmd/_child_save_tab.Rmd", package = "NMFSReports")), quiet = TRUE ) list_tables[nickname][[1]]$res <- res <- paste0(" ",res," ")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.