Description Usage Arguments See Also Examples
View source: R/rhandsontable.R
Add numeric validation to a column
1 2 3 4 5 6 7 8 9 |
hot |
rhandsontable object |
cols |
vector of column names or indices |
min |
minimum value to accept |
max |
maximum value to accept |
choices |
a vector of acceptable numeric choices. It will be evaluated after min and max if specified. |
exclude |
a vector of unacceptable numeric values |
allowInvalid |
logical specifying whether invalid data will be accepted. Invalid data cells will be color red. |
1 2 3 4 5 6 7 8 9 | library(rhandsontable)
MAT = matrix(rnorm(50), nrow = 10, dimnames = list(LETTERS[1:10],
letters[1:5]))
rhandsontable(MAT * 10) %>%
hot_validate_numeric(col = 1, min = -50, max = 50, exclude = 40)
rhandsontable(MAT * 10) %>%
hot_validate_numeric(col = 1, choices = c(10, 20, 40))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.