DataCharmer
DataCharmer

Reputation: 143

cannot INSTALL shinyapps

I encountered the following error when trying to install shinyapps on my ubuntu 13.04. Can anyone help? Thanks.

Call: require(devtools) devtools::install_github('rstudio/shinyapps')

Error:

Installing github repo(s) rstudio/shinyapps/master from hadley

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

Error in writeBin(content(request), bundle) :

can only write vector objects

Session Info:

R version 3.0.2 (2013-09-25) Platform: x86_64-pc-linux-gnu (64-bit)

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() prints the following: *

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")

Upvotes: 4

Views: 2589

Answers (3)

Divya Rathi
Divya Rathi

Reputation: 11

shinyapps package has been replaced by rsconnect which can be simply installed through CRAN in the regular way.

https://github.com/rstudio/shinyapps

Upvotes: 1

Appsoner
Appsoner

Reputation: 21

I think you have another choice. Please download the package from https://github.com/hadley/rstudio/shinyapps/archive/master.zip to your local computer. Then install the package by call install_local(). For example, install_local("~/Downloads/shinyapps-master.zip"). shinyapps-master.zip is the shinyapps package, and ~/Downloads/ is the path.

Upvotes: 2

Beasterfield
Beasterfield

Reputation: 7113

Please have a look at the parameter list of install_github. Your call should be

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

At least for devtools prior to version 1.4.1: https://github.com/hadley/devtools/blob/master/NEWS.md

Upvotes: 2

Related Questions