-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
104 lines (77 loc) · 2.4 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
---
output:
rmarkdown::github_document:
number_sections: false
toc: false
toc_depth: 2
editor_options:
chunk_output_type: console
---
```{r setup, include = FALSE}
library(here)
library(knitr)
library(bscui)
library(base64enc)
library(htmltools)
library(dplyr)
library(xml2)
cranRef <- function(x){
sprintf(
"[%s](https://CRAN.R-project.org/package=%s): %s",
x, x, packageDescription(x)$Title
)
}
```
# Build SVG Custom User Interface <img src="man/figures/bscui-medium.png" align="right" alt="" width="120" />
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/bscui)](https://cran.r-project.org/package=bscui)
[![CRAN Download Badge](https://cranlogs.r-pkg.org/badges/bscui)](https://cran.r-project.org/package=bscui)
`r packageDescription("bscui")$Description`
## Installation
### From CRAN
```{r, eval=FALSE}
install.packages("bscui")
```
### Dependencies
The following R packages available on CRAN are required:
```{r, echo=FALSE, results='asis'}
deps <- desc::desc_get_deps()
sdeps <- filter(deps, type %in% c("Depends", "Imports") & package!="R")
for(p in sdeps$package){
cat(paste("-", cranRef(p)), sep="\n")
}
```
And those are suggested for building the vignettes and running some examples:
```{r, echo=FALSE, results='asis'}
wdeps <- filter(deps, type=="Suggests" & package!="R")
for(p in wdeps$package){
cat(paste("-", cranRef(p)), sep="\n")
}
```
### From github
```{r, eval=FALSE}
devtools::install_github("patzaw/bscui")
```
## Documentation
- [Introduction to bscui](https://patzaw.github.io/bscui/articles/bscui.html);
this introduction vignette is also included in the package:
```{r, eval=FALSE}
vignette("bscui")
```
- [Preparing SVG: examples, tips and tricks](https://patzaw.github.io/bscui/articles/web_only/SVG-examples.html)
## Examples
### Building figures
This example relies on a figure of animal cells taken
from [SwissBioPics](https://www.swissbiopics.org/name/Animal_cell).
```{r, echo=FALSE, results='asis'}
ec <- readLines(system.file("examples", "main-example.R", package = "bscui"))
cat('```r', sep="\n")
cat(ec, sep="\n")
cat('```', sep="\n")
```
### Figures in 'shiny'
The following 'shiny' application relies on human female anatomical
diagram taken from the [EBI gene expression
group](https://github.com/ebi-gene-expression-group/anatomogram).
```{r, eval=FALSE}
shiny::runApp(system.file("examples", "shiny-anatomogram", package = "bscui"))
```