View source: R/shiny_functions.R
sensible_slider_vals | R Documentation |
Function for converting a numeric vector into recommended arguments for shiny::sliderInput()
, for sliders in LexOPS.
sensible_slider_vals(numeric_vec, n_levels, is_tolerance = FALSE)
numeric_vec |
The numeric vector which the slider will be for. |
n_levels |
How many sliders are to be generated for this variable? |
is_tolerance |
Logical; is the slider for specifying tolerances (e.g. for matching)? Default is |
A list object, containing the following reccommended argument values for shiny::sliderInput()
:
min
max
value
step
# for matching by frequency (e.g. control for...)
#sensible_slider_vals(LexOPS::lexops$Zipf.SUBTLEX_UK, 1, TRUE)
# for 3 levels of arousal (e.g. split by...)
#sensible_slider_vals(LexOPS::lexops$AROU.Warriner, 3)
# for filtering by word prevalence (e.g. control for...)
#sensible_slider_vals(LexOPS::lexops$PREV.Brysbaert, 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.