File: hot_validate_numeric.Rd

package info (click to toggle)
r-cran-rhandsontable 0.3.6%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,920 kB
  • sloc: makefile: 18; sh: 10
file content (43 lines) | stat: -rw-r--r-- 1,171 bytes parent folder | download
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rhandsontable.R
\name{hot_validate_numeric}
\alias{hot_validate_numeric}
\title{Handsontable widget}
\usage{
hot_validate_numeric(hot, cols, min = NULL, max = NULL, choices = NULL,
  exclude = NULL, allowInvalid = FALSE)
}
\arguments{
\item{hot}{rhandsontable object}

\item{cols}{vector of column names or indices}

\item{min}{minimum value to accept}

\item{max}{maximum value to accept}

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

\item{exclude}{a vector of unacceptable numeric values}

\item{allowInvalid}{logical specifying whether invalid data will be
accepted. Invalid data cells will be color red.}
}
\description{
Add numeric validation to a column
}
\examples{
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))
}
\seealso{
\code{\link{hot_validate_character}}
}