R/saveUI.R

Defines functions saveUI

Documented in saveUI

#' Save Shiny UI Temporarily
#'
#' @inheritParams saveFiles
#' @returns No return value. It is used to save necessary files temporarily
#' to run Shiny App.
#'
saveUI <- function(filePath){
  bundstr <- "shinyServer(function(input, output) {
})
ui <- fluidPage(
  tags$script(src = 'bundle.js')
)"

  bundsplt <- strsplit(bundstr, "\n")
  bundvec <- unlist(bundsplt)

  fileConn <- file(paste(filePath,"/shinyapp/ui.R",sep=""))
  writeLines(bundvec, fileConn)
  close(fileConn)
}

Try the htetree package in your browser

Any scripts or data that you put into this service are public.

htetree documentation built on April 4, 2025, 5:15 a.m.