mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 04:27:30 +02:00
abandoned quarto to render report using rmarkdown instead. works smoothly!
This commit is contained in:
parent
159750fa62
commit
d51fd27996
7 changed files with 165 additions and 55 deletions
21
R/helpers.R
21
R/helpers.R
|
|
@ -50,6 +50,27 @@ write_quarto <- function(data,...) {
|
|||
)
|
||||
}
|
||||
|
||||
write_rmd <- function(data,...) {
|
||||
# Exports data to temporary location
|
||||
#
|
||||
# I assume this is more secure than putting it in the www folder and deleting
|
||||
# on session end
|
||||
|
||||
# temp <- base::tempfile(fileext = ".rds")
|
||||
# readr::write_rds(data, file = here)
|
||||
|
||||
readr::write_rds(data, file = "www/web_data.rds")
|
||||
|
||||
## Specifying a output path will make the rendering fail
|
||||
## Ref: https://github.com/quarto-dev/quarto-cli/discussions/4041
|
||||
## Outputs to the same as the .qmd file
|
||||
rmarkdown::render(
|
||||
params = list(data.file = "web_data.rds"),
|
||||
# execute_params = list(data.file = temp),
|
||||
...
|
||||
)
|
||||
}
|
||||
|
||||
#' Flexible file import based on extension
|
||||
#'
|
||||
#' @param file file name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue