Skip to content
Snippets Groups Projects
Commit 13bc9f26 authored by arsenij.ustjanzew's avatar arsenij.ustjanzew
Browse files

small corrections in the old vignette;

added github url to the description
parent 39c68149
No related branches found
No related tags found
No related merge requests found
Pipeline #156392 failed
......@@ -8,6 +8,8 @@ Authors@R: c(
person(given = "Mario", family = "Looso", email = "mario.looso@mpi-bn.mpg.de", role = c("aut", "cph"), comment = c(ORCID = "0000-0003-1495-9530")))
Description: Create customized, web-based dashboards for data presentation, exploration and sharing. 'i2dash' integrates easily into existing data analysis pipelines and can organize scientific findings thematically across different pages and layouts.
License: MIT + file LICENSE
URL: https://loosolab.github.io/i2dash/
BugReports: https://github.com/loosolab/i2dash/issues
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.1.1
......
......@@ -6,7 +6,7 @@ author:
email: jens.preussner@mpi-bn.mpg.de
- name: Arsenij Ustjanzew
affiliation:
email: arsenij.ustjanzew@mpi-bn.mpg.de
email: arsenij.ustjanzew@gmail.com
date: "`r BiocStyle::doc_date()`"
package: "`r BiocStyle::pkg_ver('i2dash')`"
output:
......@@ -53,6 +53,12 @@ The R package i2dash provides classes and functionality to programatically creat
The package can be installed with the `r BiocStyle::CRANpkg("remotes")` library:
```{r, eval=FALSE}
install.packages("i2dash", dependencies = TRUE)
```
or the development version:
```{r, eval=FALSE}
remotes::install_git(url = "https://gitlab.gwdg.de/loosolab/software/i2dash.git", repos = BiocManager::repositories())
```
......@@ -63,6 +69,11 @@ Once installed, the package can be loaded and attached to your current workspace
library(i2dash)
```
For this tutorial we need to install the following packages:
```{r, eval=FALSE}
install.packages(c("leaflet", "plotly", "ggplot2", "RColorBrewer"))
```
# Working with i2dash
## Creating a dashboard
......@@ -188,6 +199,14 @@ knitr::include_graphics("./images/example_page1.png")
Text and images can be added to a **page** by calling the `add_component` function with a file path. The function will include file paths ending with `.[png|jpg|jpeg|gif]` as image content, and other files as text content:
```{r, eval = TRUE}
# download the image & text or use the files in the package
dir.create("images")
dir.create("texts")
img <- "http://www.desktopimages.org/pictures/2014/1010/1/orig_76044.jpg"
download.file(img,'images/lemur.jpg', mode = 'wb')
text <- readLines("https://en.wikipedia.org/wiki/Lemuriformes")
cat(text[262],file="texts/lemurs.md",sep="\n")
dashboard %<>%
add_component(file.path("images/lemur.jpg"),
page = "page3",
......@@ -320,7 +339,7 @@ dashboard %>%
assemble(file = "MyDashboard.Rmd", pages = c("page1", "page3", "page4", "page5"))
```
The resulting R Markdown file can be run with `r BiocStyle::CRANpkg("shiny")` or rendered with `r BiocStyle::CRANpkg("rmarkdown")`.
The resulting R Markdown file can be run with `r BiocStyle::CRANpkg("shiny")` or rendered with `r BiocStyle::CRANpkg("rmarkdown")`. Alternatively, open the R Markdown file in RStudio and click on the "Knit"/ "Run Dockument" button.
# Session Info {.unnumbered}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment