Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

shinyapps.io and github Packages

Tags:

github

r

shiny

I have a shiny program in R that works great. But I am having trouble deploying it to shinyapps.io.

The javascript error console gives me the following error:

Listening on http://127.0.0.1:46574
  Downloading github repo jlisic/saAlloc@master
  Installing saAlloc
  '/usr/lib/R/bin/R' --vanilla CMD INSTALL  \
  '/tmp/RtmpvmoFM3/devtools2c6b564aad/jlisic-saAlloc-62692fc'  \
  --library='/usr/local/lib/R/site-library' --install-tests 

Error: ERROR: no permission to install to directory ‘/usr/local/lib/R/site-library’
Error : Command failed (1)

There is nothing fancy about my package it just has a default Makevars file. Any help or suggestions would be appreciated.

like image 860
Jonathan Lisic Avatar asked Oct 06 '14 19:10

Jonathan Lisic


People also ask

Can I host shiny app on GitHub?

GitHub is a great place to organise and share your code using version control. You can also use it to host Shiny app code for others to download and run on their own computer.

How do I deploy to Shinyapps io?

To deploy your application, use the deployApp command from the rsconnect packages. If you're using the RStudio IDE, you can also deploy your application by clicking the Publish button while viewing the application. Once the deployment finishes, your browser should open automatically to your newly deployed application.

Is Shinyapps IO free?

New to Shiny? Deploy your applications for FREE.

What is a shiny server?

Shiny Server enables users to host and manage Shiny applications on the Internet. Shiny is an R package that uses a reactive programming model to simplify the development of R-powered web applications. Shiny Server can manage R processes running various Shiny applications over different URLs and ports.


1 Answers

I have also been struggling with this issue, and I just found a working answer in the shinyapps.io Google users group by @Yihui. Quoting his post:

You should not install the package inside your app (i.e. do not call install_github() in your app code). Just install it locally, and shinyapps.io will figure out how to install it on the server.

https://groups.google.com/d/msg/shinyapps-users/5S8jTJ-SeHM/HCPGUjYVUM4J

Removing the devtools::install_github() line in server.R worked for me. Back end magic!

EDIT: The reason why this works is explained in more detail in this rsconnect issue: https://github.com/rstudio/rsconnect/issues/88

like image 164
sebpardo Avatar answered Sep 17 '22 19:09

sebpardo