Description Usage Arguments Value Examples
Create a dynamic image object
1 2 3 |
sel_id |
The id of the selector used to choose options |
options |
A named list of filepaths, with the number of options and names of options matching those used in the selector object. |
embed |
A logical vector for whether images should be embedded directly into the HTML code as base64 strings. If FALSE, image files are referred to via links in the HTML code. |
Raw HTML representing the image object
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 | ## Not run:
```{r add_js, results='asis'}
library(selr)
add_javascript()
```
```{r add_selector, results='asis'}
add_selector(
sel_id = "Dataset",
options = list("Option_1" = "iris",
"Option_2" = "mtcars",
"Option_3" = "US Arrests")
)
```
```{r, results='asis'}
sel_text(
sel_id = "Dataset",
options = list("Option_1" = "Plots/Iris.png",
"Option_2" = "Plots/mtcars.png",
"Option_3" = "Plots/US Arrests.png")
)
```
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.