Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Mauricio “Pachá” Vargas Sepúlveda
Blog with notes about R, Shiny, SQL, Python, Linux and C++. This blog is listed on R-Bloggers.
Categories
- Armadillo
- Arrow
- BibTeX
- Blogdown
- C++
- CRAN
- D3po
- DigitalOcean
- DuckDB
- Education
- GitHub
- Google Sheets
- Inkscape
- International Trade
- Interviews
- Kubernetes
- Latex
- Linear algebra
- Linear models
- Linux
- Manjaro
- Microsoft Excel
- NLP
- Non-English datasets
- OS X
- OpenBLAS
- Pelican
- Positron
- PostGIS
- PostgreSQL
- Python
- Quarto
- R
- R Packages
- R-Universe
- R4DS
- REST API
- RStudio
- RStudio Server
- Redatam
- Rick and Morty
- SPSS
- SQL
- Selenium
- Shiny
- Spreadsheets
- Stan
- Stata
- Statistics
- Tabler
- Tidyverse
- Ubuntu
- VSCode
- Windows
- Zotero
- cpp11
- cpp4r
- ggplot2
- golem
- plotnine
- purrr
- wbstats
Mauricio “Pachá” Vargas S.
August 24, 2025
Because of delays with my scholarship payment, if this post is useful to you I kindly ask a minimal donation on Buy Me a Coffee. It shall be used to continue my Open Source efforts. The full explanation is here: A Personal Message from an Open Source Contributor. If you play the electric guitar, the same scholarship chaos led me to turn my guitar pedals and DIY kits hobby into a business, and you can check those here.
I uploaded a Shiny app made with Golem to Shiny Apps for a live demo. I had to troubleshoot a few issues with the deployment so here are the steps I used. I hope this is useful 🙂
After creating a Shiny app skeleton with golem::create_golem("pkgname") you can create an app such as the 2×2 Cobb-Douglas General Equilibrium viewer (code on GitHub).
When I tried to deploy that Cobb-Douglas app to ShinyApps.io I got this message:
> rsconnect::deployApp() ℹ Capturing R dependencies The following package(s) were installed from an unknown source: - cobbdouglasge [0.0.0.9000] renv may be unable to restore these packages in the future. Consider reinstalling these packages from a known source (e.g. CRAN). Error in renv_snapshot_validate_report(valid, prompt, force) : aborting snapshot due to pre-flight validation failure
The cause of the problem is that when testing my app, I installed it locally with devtools::install(), and ShinyApps needs CRAN or GitHub as a source for the dependencies.
To remedy that, I added the following to dev/03_deploy.R without running it:
golem::add_shinyappsio_file()
remotes::install_github("pachadotdev/cobbdouglasge")
use_git_ignore("rsconnect/")
rsconnect::deployApp()
I know pak is the standard these days, but it gave me a compilation error when I tried to install it, so I used remotes.
As an optional step to save space in my ShinyApps account, I created the file .rscignore containing:
.here CODE_OF_CONDUCT.md LICENSE* NEWS* README* dev man vignettes tests
Then I ran the previous chunk that allowed me to deploy the Cobb-Douglas app without errors.
Loading…
