Skip to content

add what about dash section #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Mar 23, 2020
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
27 changes: 27 additions & 0 deletions what-about-dash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

### 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(
dccGraph(figure=fig)
)

app$run_server()
Copy link
Contributor

@nicolaskruchten nicolaskruchten Mar 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
app$run_server()
app$run_server(debug=TRUE, dev_tools_hot_reload=FALSE)

```