不能安装shinyapps

时间:2014-01-03 09:54:47

标签: r shiny

尝试在我的ubuntu 13.04上安装shinyapps时遇到以下错误。有人可以帮忙吗?感谢。

拨打:     需要(devtools)     devtools :: install_github( 'rstudio / shinyapps')

错误

  

从hadley安装github repo(s)rstudio / shinyapps / master

     

https://github.com/hadley/rstudio/shinyapps/archive/master.zip

安装rstudio / shinyapps.zip      

writeBin(内容(请求),包)中的错误:

     

只能写矢量对象

会话信息

R版本3.0.2(2013-09-25) 平台:x86_64-pc-linux-gnu(64位)

locale:
[1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C                LC_TIME=zh_CN.UTF-8       
[4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=zh_CN.UTF-8     LC_MESSAGES=en_US.UTF-8   
[7] LC_PAPER=zh_CN.UTF-8       LC_NAME=C                   LC_ADDRESS=C              
[10] LC_TELEPHONE=C            LC_MEASUREMENT=zh_CN.UTF-8  LC_IDENTIFICATION=C   

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] R.oo_1.15.8       R.methodsS3_1.5.2 XML_3.98-1.1      devtools_1.4.1   

loaded via a namespace (and not attached):
[1] digest_0.6.3   evaluate_0.5.1 httr_0.2       memoise_0.1    parallel_3.0.2 RCurl_1.95-4.1
[7] stringr_0.6.2  tools_3.0.2    whisker_0.3-2

* trackback()打印以下内容:*

8: stop("can only write vector objects")
7: writeBin(content(request), bundle)
6: (function (url, name = NULL, subdir = NULL, config = list(), 
   before_install = NULL, ...) 
{
   if (is.null(name)) {
       name <- basename(url)
   }
   message("Downloading ", name, " from ", url)
   bundle <- file.path(tempdir(), name)
   request <- GET(url, config)
   stop_for_status(request)
   writeBin(content(request), bundle)
   on.exit(unlink(bundle), add = TRUE)
   install_local_single(bundle, subdir = subdir, before_install = before_install, 
       ...)
})(dots[[1L]][[1L]], dots[[2L]][[1L]], subdir = NULL, config = list(), 
   before_install = function (bundle, pkg_path) 
   {
       desc <- file.path(pkg_path, "DESCRIPTION")
       if (!ends_with_newline(desc)) 
           cat("\n", sep = "", file = desc, append = TRUE)
       append_field <- function(name, value) {
           if (!is.null(value)) {
               cat("Github", name, ":", value, "\n", sep = "", 
                 file = desc, append = TRUE)
           }
       }
       append_field("Repo", repo)
       append_field("Username", username)
       append_field("Ref", ref)
       append_field("SHA1", github_extract_sha1(bundle))
       append_field("Pull", pull)
       append_field("Subdir", subdir)
       append_field("Branch", branch)
       append_field("AuthUser", auth_user)
   })
5: mapply(install_url_single, url, name, MoreArgs = list(subdir = subdir, 
   config = config, before_install = before_install, ...))
4: install_url(url, name = paste(repo, ".zip", sep = ""), subdir = subdir, 
   config = auth, before_install = github_before_install, ...)
3: FUN("shinyapps"[[1L]], ...)
2: vapply(repo, install_github_single, FUN.VALUE = logical(1), username, 
   ref, pull, subdir, branch, auth_user, password, ...)
1: install_github(repo = "shinyapps", username = "rstudio")

3 个答案:

答案 0 :(得分:2)

请查看install_github的参数列表。你的电话应该是

install_github( repo = "shinyapps", username="rstudio" )

至少在版本1.4.1之前的devtoolshttps://github.com/hadley/devtools/blob/master/NEWS.md

答案 1 :(得分:2)

我认为你还有另一种选择。请将包从https://github.com/hadley/rstudio/shinyapps/archive/master.zip下载到您的本地计算机。然后通过调用install_local()安装软件包。例如,  install_local("~/Downloads/shinyapps-master.zip")。  shinyapps-master.zip是shinyapps包,~/Downloads/是路径。

答案 2 :(得分:1)

shinyapps软件包已被rsconnect取代,可以通过CRAN以常规方式安装。

https://github.com/rstudio/shinyapps