How to publish the following Shiny code, in which I use my package.
I am not sure, how to publish the following structure's shiny Code. Is it sufficient to upload it as a function? Or I need to divide the following code into ui.R and sever.R and the other materials?
Note that the following function has been already published in my package on CRAN.
fit_GUI_dashboard <- function(
DF=data.frame(h=c( 97L, 32L, 31L),f=c( 1L , 14L, 74L )),
NL.max=1111,
NI.max=1111,
MCMC.chains.max=4
){
outdir <- system.file("myapp", package = "MyPakcage")
if (outdir == "") {
stop("Could not find myapp. Try re-installing `MyPakcage`.", call. = FALSE)
}
ui1 <- shinydashboard::dashboardPage(
)#dashboardPage
server1 <- shiny::shinyServer(function(input, output) {
})
## run app
shiny::runApp(list(ui=ui1, server=server1))
return(invisible())
}
Publish means the following:
I try it, but unknown error occurs and UI is correctly arranged but the program is not running as the following image:
You are publishing your apps to your shinyapps.io account, so you can check the console logs for your remote R session by logging into your application dashboard on the shinyapps.io site.
After logging in and selecting your application, click on the "Logs" button towards the upper-righthand section of the screen (visible in below screenshot). The log will tell you exactly what the error is: it may be a referenced variable that's not loaded by your script, a package dependency that needs to be explicitly installed on your remote server, or something else entirely. The error message will give you more information.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.