Debian Codegraph @

man/hot_validate_numeric.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/rhandsontable.R
3 \name{hot_validate_numeric}
4 \alias{hot_validate_numeric}
5 \title{Handsontable widget}
6 \usage{
7 hot_validate_numeric(
8 hot,
9 cols,
10 min = NULL,
11 max = NULL,
12 choices = NULL,
13 exclude = NULL,
14 allowInvalid = FALSE
15 )
16 }
17 \arguments{
18 \item{hot}{rhandsontable object}
19
20 \item{cols}{vector of column names or indices}
21
22 \item{min}{minimum value to accept}
23
24 \item{max}{maximum value to accept}
25
26 \item{choices}{a vector of acceptable numeric choices. It will be evaluated
27 after min and max if specified.}
28
29 \item{exclude}{a vector of unacceptable numeric values}
30
31 \item{allowInvalid}{logical specifying whether invalid data will be
32 accepted. Invalid data cells will be color red.}
33 }
34 \description{
35 Add numeric validation to a column
36 }
37 \examples{
38 library(rhandsontable)
39 MAT = matrix(rnorm(50), nrow = 10, dimnames = list(LETTERS[1:10],
40 letters[1:5]))
41
42 rhandsontable(MAT * 10) \%>\%
43 hot_validate_numeric(col = 1, min = -50, max = 50, exclude = 40)
44
45 rhandsontable(MAT * 10) \%>\%
46 hot_validate_numeric(col = 1, choices = c(10, 20, 40))
47 }
48 \seealso{
49 \code{\link{hot_validate_character}}
50 }