Hi I am at my wits end, been trying to deploy a shiny and bs4dash package on shinyapps and postitcloud for the last 3 days but it keeps coming up with an error!
The dashboard works fine locally but the moment I deploy its gone. dead.
I have tried to install all of the packages and dependencies, changed my working directory from local to cloud, pasted my code on the posit cloud r studio to deploy it. Nothing works. Help please.
My setup code is options(repos = c(CRAN ="https://cloud.r-project.org"))
#set a CRAN Mirror explicitly
setwd("~/Study/Data Visualisation/2024")
packages<-c(
"shiny", "bs4Dash", "dplyr", "readr", "plotly", "leaflet", "DT", "fresh",
"tidyverse", "rmarkdown", "tinytex", "prettydoc", "magrittr", "outliers",
"knitr", "MVN", "here", "lubridate", "data.table", "here", "rsconnect"
)
install and load packages
install_and_load <- function(pkg) {
if (!require(pkg, character.only = TRUE)) {
install.packages(pkg, dependencies = TRUE)
library(pkg, character.only = TRUE)
}
}
install and load all packages
lapply(packages, install_and_load)