diff --git a/.circleci/config.yml b/.circleci/config.yml index 2f7c3d75..1006a50c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -27,7 +27,7 @@ jobs: sudo apt-get install -y pandoc libudunits2-dev libgdal-dev libxt-dev libglu1-mesa-dev libfftw3-dev sudo R -e 'install.packages(c("curl", "devtools", "mvtnorm")); devtools::install_github("hypertidy/anglr"); devtools::install_github("johannesbjork/LaCroixColoR"); devtools::install_github("ropensci/plotly"); install.packages("BiocManager"); BiocManager::install("EBImage"); devtools::install_deps(dependencies = TRUE) ' - save_cache: - key: cache3 + key: cache4 paths: - "/usr/local/lib/R/site-library" - store_artifacts: @@ -41,8 +41,8 @@ jobs: mkdir build mkdir build/ggplot2 mkdir build/r - for i in r/*.Rmd; do Rscript -e "rmarkdown::render('$i', output_dir='build/r')"; done - for i in ggplot2/*.Rmd; do Rscript -e "rmarkdown::render('$i', output_dir='build/ggplot2')"; done + for i in r/*.Rmd; do cat what-about-dash.md >> $i; Rscript -e "rmarkdown::render('$i', output_dir='build/r')"; done + for i in ggplot2/*.Rmd; do cat what-about-dash.md >> $i; Rscript -e "rmarkdown::render('$i', output_dir='build/ggplot2')"; done python3 -m venv venv . venv/bin/activate pip3 install python-frontmatter diff --git a/what-about-dash.md b/what-about-dash.md new file mode 100644 index 00000000..a36af329 --- /dev/null +++ b/what-about-dash.md @@ -0,0 +1,31 @@ + +### What About Dash? + +[Dash for R](https://dashr.plot.ly/) is an open-source framework for building analytical applications, with no Javascript required, and it is tightly integrated with the Plotly graphing library. + +Learn about how to install Dash for R at https://dashr.plot.ly/installation. + +Everywhere in this page that you see `fig`, you can display the same figure in a Dash for R application by passing it to the `figure` argument of the [`Graph` component](https://dashr.plot.ly/dash-core-components/graph) from the built-in `dashCoreComponents` package like this: + +```{r eval=FALSE} +library(plotly) + +fig <- plot_ly() +# fig <- fig %>% add_trace( ... ) +# fig <- fig %>% layout( ... ) + +library(dash) +library(dashCoreComponents) +library(dashHtmlComponents) + +app <- Dash$new() +app$layout( + htmlDiv( + list( + dccGraph(figure=fig) + ) + ) +) + +app$run_server(debug=TRUE, dev_tools_hot_reload=FALSE) +```