首页 文章

部署闪亮的应用程序时出错

提问于
浏览
1

我写了一个闪亮的应用程序,它取决于CRAN,bioconductor和Github的一些软件包 . 我想在shinyapps.io上部署它,但得到一些错误 . 首先,我使用shinyapp.io用户指南上的指南 . 只需使用R包"rsconnect",并使用setAccountInfo设置帐户,然后使用rsconnect :: deployApp部署我的应用程序,但会收到以下错误 .
enter image description here

然后我添加选项(repos = BiocInstaller :: biocinstallRepos())它允许我在bioconductor上安装包,但我的应用程序也依赖于Github的包,所以得到以下错误 .

enter image description here

1 回答

  • 0

    请不要发布图片 . 它对字体大小没有帮助,也没有正确地传达您的问题 . 尝试发布您输入的代码和错误,最后发布sessionInfo() .

    根据您的错误,您可能错过了文档Using your R packages in the cloud .

    为了在shinyapps.io上成功安装BioConductor软件包,必须配置repos选项......`

    检查您的会话正在使用的存储库

    getOption("repos")
    

    默认情况下,您应该看到 . Bioconductor失踪的地方 .

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

    您可以在 .Rprofile (R根目录)中进行全局更改 . 或者创建一个新的 .Rprofile . 我更喜欢第二种方式,你可以更好地控制 .

    这里的步骤详述Package management in RStudio Connect .

    在要部署的app目录中添加 .Rprofile . 复制粘贴以下内容 .

    # 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)
    })
    

相关问题