Publishing code to RStudio Connect that uses an archived version of an R pacakge

Hi,

I'm trying to publish an R shiny code that uses reticulate for loading and using (in addition to the required numpy package): pandas, scipy, and scanpy.

I'm getting this error in the bundle loading step:

Preparing to deploy application...DONE
Uploading bundle for application: 44...Warning: Unable to determine the repository for package mnormt
Error: 
* Unable to determine the location for some packages. Packages must
   come from a package repository like CRAN or a source control system.
   Check that options('repos') refers to a package repository
   containing the needed package versions.
In addition: Warning messages:
1: In fileDependencies.R(file) :
  Failed to parse /tmp/RtmpvUVrdQ/file68d2494ac71/venv/lib/python3.6/site-packages/statsmodels/stats/libqsturng/CH.r ; dependencies in this file will not be discovered.
2: In fileDependencies.R(file) :
  Failed to parse /tmp/RtmpvUVrdQ/file68d2494ac71/venv/lib64/python3.6/site-packages/statsmodels/stats/libqsturng/CH.r ; dependencies in this file will not be discovered.
Execution halted

Looking into it a bit, the mnormt package, which I'm assuming is causing the problem, that is available on cran.r-project.org requires R >= 4.0.0 but my R version is 3.6.0.

So I followed this RStudio topic and installed an older version of `mnormt' using:

devtools::install_version("mnormt", version = "1.5-7", repos = "http://cran.us.r-project.org")

The error still persists. I then tried to add to the .RProfile file located in the same directory as my shiny R code these lines:

local({
  r <- getOption("repos")
  r["CRAN"] <- "https://cran.rstudio.com/"
  r["mycompany"] <- "http://cran.us.r-project.org"
  options(repos = r)
})

Hoping the:

r["mycompany"] <- "http://cran.us.r-project.org"

might guide the publishing process to find the 'mnormt but the error still persists. (this was a long ■■■■..).

Any idea how to get RStudio Connect find this 'mnormt' older version?

Thanks

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.