Hi There,
I'm attempting to deploy an app to
shinyapps.io, and I get the following error:
Downloading GitHub repo nstrayer/shinyswipr@master
from URL https://api.github.com/repos/nstrayer/shinyswipr/zipball/master
Installing shinyswipr
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet \
CMD INSTALL \
'/tmp/RtmpJkuiih/devtools351afc0b59/nstrayer-shinyswipr-4584b11' \
--library='/usr/local/lib/R/site-library' --install-tests
Error: ERROR: no permission to install to directory ‘/usr/local/lib/R/site-library’
Installation failed: Command failed (1)
Attaching package: ‘dplyr’
The following objects are masked from ‘package:data.table’:
between, first, last
The following objects are masked from ‘package:stats’:
filter, lag
The following objects are masked from ‘package:base’:
intersect, setdiff, setequal, union
Attaching package: ‘DT’
The following objects are masked from ‘package:shiny’:
dataTableOutput, renderDataTable
Error in value[[3L]](cond) : cannot change working directory
Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted
I think it may have something to do with the fact that my app.R code relies on a package from a github source, and that in my app relies on a csv file that I initially load into my R environment. If I comment out devtools::install_github(), and setwd(), I still get the same error. This is what that code looks like, the rest is my ui(), server(), and shinyApp().
# load packages
devtools::install_github("nstrayer/shinyswipr")
library(shinyswipr)
library(shiny)
library(data.table)
library(dplyr)
library(DT)
# set wd
setwd('/Users/richpauloo/Desktop/AGU API')
# bring in cleaned 2016 data
dat <- fread("dat_2016.csv")