hot_validate_character: Handsontable widget

Description Usage Arguments See Also Examples

View source: R/rhandsontable.R

Description

Add numeric validation to a column

Usage

1
hot_validate_character(hot, cols, choices, allowInvalid = FALSE)

Arguments

hot

rhandsontable object

cols

vector of column names or indices

choices

a vector of acceptable numeric choices. It will be evaluated after min and max if specified.

allowInvalid

logical specifying whether invalid data will be accepted. Invalid data cells will be color red.

See Also

hot_validate_numeric

Examples

1
2
3
4
5
6
7
8
library(rhandsontable)
DF = data.frame(val = 1:10, bool = TRUE, big = LETTERS[1:10],
                small = letters[1:10],
                dt = seq(from = Sys.Date(), by = "days", length.out = 10),
                stringsAsFactors = FALSE)

rhandsontable(DF) %>%
  hot_validate_character(col = "big", choices = LETTERS[1:10])

Example output



rhandsontable documentation built on May 27, 2021, 5:07 p.m.