In R, install the package from Github using devtools. Run the following commands:
install.packages('devtools')
library(devtools)
install_github('statist7/LMSgrowth2', dependencies=TRUE)
Then run LMSgrowth2::run_app()
to start the Shiny app.
There are several ways to deploy the LMSgrowth2 Shiny app. Here are three:
-
Deploy to shinyapps.io. Clone this repository, open the
app.R
file in RStudio & click the Publish button. See shinyapps.io getting started documentation for more information. -
Using Docker. Run on the command line (specifying uploads directory on host):
git clone https://github.com/statist7/LMSgrowth2.git
cd LMSgrowth2
docker build --tag lmsgrowth2 .
docker run --publish 3838:3838 -v /uploads/dir/on/host:/srv/shiny-server/LMSgrowth2/inst/uploads lmsgrowth2
Then open your browser http://localhost:3838/
- Using Vagrant. Run on the command line.
git clone https://github.com/statist7/LMSgrowth2.git
cd LMSgrowth2/vagrant
vagrant up
Then open your browser http://localhost:3001/
Following packages are used during development and must be installed in the R user library
install.packages(c('devtools', 'usethis', 'testthat'))
-
Clone the LMSgrowth2 repository
-
Open the project in RStudio
-
Install the project package dependencies:
packrat::restore()
-
Test:
- Build > Test Package
- To run the app
devtools::load_all(); LMSgrowth2::run_app()
- List all packages where updates are available using
old.packages()
. - Either, update a specific package using, for example,
install.packages('plotly')
or all packages usingupdate.packages()
. - Run LMSgrowth2 in the usual way and check everything is working.
- Once confirmed, save the updates to Packrat using
packrat::snapshot(snapshot.sources=F)
.