I have published my Marketing Mix Model (MMM) app many many times to shinyapps.io, but giving error with the same error in the log: "Warning: Error in file: cannot open the connection". Can someone help me? is it because my RDS file is too large (the largest is 268,000 KB).
When running locally, it's working fine, but the issue is during publishing - throwing error
I have put all the related files in the folder namely "www" along with my app:
my_app/
├── app.Rmd
├── www/
└── all related files, including other RDS files
library(Robyn)
library(flexdashboard)
library(shiny)
library(shinyWidgets)
library(shinyjs)
# Core
library(tidyverse)
library(dplyr)
library(tidyquant)
# Interactive Visualizations
library(plotly)
# Modeling
library(parsnip)
library(xgboost)
library(timetk)
library(janitor)
InputCollect <- readRDS("www/input_collect.rds")
OutputCollect <- readRDS("www/model_output.rds")
# image_folder <- fs::dir_ls()
raw_data <- read.csv("www/Data - Weekly.csv")
raw_data <- raw_data %>%
as_tibble() %>%
mutate(DATE = as.Date(DATE, format = "%Y-%m-%d")) %>%
mutate(revenue = as.double(revenue),
FB_TOF = as.double(FB_TOF),
Sale = as.double(Sale)) %>%
rename(date = DATE)
# SELECTING BEST MODEL ----
best_model_nrmse_tbl <- OutputCollect$clusters$models %>%
ungroup() %>%
slice_min(nrmse)
best_model_nrmse_tbl$solID
select_model <- best_model_nrmse_tbl$solID
create_files <- TRUE
ExportedModel <- robyn_write(InputCollect, OutputCollect, select_model, export = create_files)
print(ExportedModel)
InputCollect$dep_var_type <- "revenue"