mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 04:27:30 +02:00
resolving report creating on server by exporting/importing kable/md table. works for now. Not ideal.
This commit is contained in:
parent
9f828aa4bd
commit
02dfcf50d6
11 changed files with 143 additions and 55 deletions
12
R/helpers.R
12
R/helpers.R
|
|
@ -29,19 +29,23 @@ getfun <- function(x) {
|
|||
#' @return output file name
|
||||
#' @export
|
||||
#'
|
||||
write_quarto <- function(data, ...) {
|
||||
write_quarto <- 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 <- tempfile(fileext = ".rds")
|
||||
readr::write_rds(data, file = temp)
|
||||
|
||||
# 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
|
||||
quarto::quarto_render(
|
||||
execute_params = list(data.file = temp),
|
||||
execute_params = list(data.file = "web_data.rds"),
|
||||
# execute_params = list(data.file = temp),
|
||||
...
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue