简体   繁体   中英

Error in deploying shiny app

I wrote a shiny app,it depend on some packages from CRAN,bioconductor and Github. I want to deploy it on shinyapps.io,but get some error. Firstly, I use the guide on shinyapp.io user guide. Just using R package "rsconnect",and set account using setAccountInfo and then use rsconnect::deployApp to deploy my app, but get the following error. 在此处输入图片说明

And then I add options(repos = BiocInstaller::biocinstallRepos()) It allowed me to install packages on bioconductor,but my app also depend on packages from Github, so get the following Error.

在此处输入图片说明

Please don't post images. It does not help with fonts sizes and does not communicate your issue properly. Try posting the code you entered and the error and finally, sessionInfo().

As per your error, you probably missed in the documentation Using your R packages in the cloud .

In order for BioConductor packages to install successfully on shinyapps.io, the repos option must be configured...`

Check what the repos your session is using

getOption("repos")  

by default, you should see. Where the Bioconductor is missing.

                                            CRAN 
"https://mran.microsoft.com/snapshot/2018-08-01" 
                                       CRANextra 
            "http://www.stats.ox.ac.uk/pub/RWin" 

You can make a global change in .Rprofile (R root directory). or create a new .Rprofile . I would prefer the second way, where you have better control.

The steps are detailed here Package management in RStudio Connect .

Add .Rprofile in the app directory which you intend to deploy. copy paste the following.

# A sample .Rprofile file with two different package repositories

local({
  r <- getOption("repos")  
    r["BioCsoft"] <- "https://bioconductor.org/packages/3.7/bioc" 
    r["BioCann"]  <- "https://bioconductor.org/packages/3.7/data/annotation" 
    r["BioCexp"]  <- "https://bioconductor.org/packages/3.7/data/experiment" 
r["BioCworkflows"]<- "https://bioconductor.org/packages/3.7/workflows"            
    r["CRAN"]     <- "https://cran.rstudio.com" 
  options(repos = r)
})

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM