Description Usage Arguments Value Examples
Create a dynamic text object
1 2 3 |
sel_id |
The id of the selector used to choose options |
options |
A named list, with the number of options and names of options matching those used in the selector object. |
type |
Whether the HTML object should be a 'span' object or a 'div' object. |
Raw HTML representing the text 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 26 27 | ## Not run:
# RMarkdown code
```{r add_js, results='asis'}
library(selr)
add_javascript()
```
```{r add_selector, results='asis'}
add_selector(
sel_id = "Language",
options = list("Option_1" = "English",
"Option_2" = "Hebrew",
"Option_3" = "Pirate")
)
```
```{r, results='asis'}
sel_text(
sel_id = "Language",
options = list("Option_1" = "Hello",
"Option_2" = "Shalom",
"Option_3" = "Ahoy")
)
```
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.