knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of trackpack is to track my package 'lazytrade'
This repository was created using golem framework for developing Shiny App. Simple shiny app was developed as an R package.
This repository will not be released on CRAN. If it would, then it could be installed with:
install.packages("trackpack")
However it is possible to:
docker run -it --rm -p 80:80 vladdsm/docker-trackpack
http://0.0.0.0
Or, it is possible to fork or clone this repository and then:
trackpack::run_app()
'/dev/03_deploy.R'
golem::add_dockerfile()
to build Dockerfilecd '/usr/trackpack/'
docker build -t vladdsm/docker-trackpack .
[or use different image name]Example of docker-compose.yml file is available in the repository compose-example
Run_Shiny_Trackpack
and replace local folder path. Well, also replace image name in case local image is available (see above how to build docker image locally)Run_Shiny_Trackpack
(this will start container)http://0.0.0.0
Stop_Shiny_Trackpack
or by executing docker-compose down
in the TerminalThis is a basic core code that is used to solve a common problem:
## business logic code library(ggplot2) library(cranlogs) stats <- cran_downloads("lazytrade", from = Sys.Date() - 100, to = Sys.Date() - 1) #sum(stats$count) ggplot(stats, aes(date, count)) + geom_col() + labs( title = sprintf( "{stats} downloads to %s", Sys.Date() - 1 ), caption = "data from {cranlogs}" ) + theme_minimal()
Golem framework also containing 'helper' functions allowing to setup:
This is creating possibility of 'sustainable' development. e.g. if new feature is needed, then:
Users may get a new version as soon as Docker autobuild will build updated image
You'll still need to render README.Rmd
regularly, to keep README.md
up-to-date.
In that case, don't forget to commit and push the resulting figure files, so they display on GitHub!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.