Debian Codegraph @

man/hot_col.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/rhandsontable.R
3 \name{hot_col}
4 \alias{hot_col}
5 \title{Handsontable widget}
6 \usage{
7 hot_col(
8 hot,
9 col,
10 type = NULL,
11 format = NULL,
12 source = NULL,
13 strict = NULL,
14 readOnly = NULL,
15 validator = NULL,
16 allowInvalid = NULL,
17 halign = NULL,
18 valign = NULL,
19 renderer = NULL,
20 copyable = NULL,
21 dateFormat = NULL,
22 default = NULL,
23 language = NULL,
24 ...
25 )
26 }
27 \arguments{
28 \item{hot}{rhandsontable object}
29
30 \item{col}{vector of column names or indices}
31
32 \item{type}{character specify the data type. Options include:
33 numeric, date, checkbox, select, dropdown, autocomplete, password,
34 and handsontable (not implemented yet)}
35
36 \item{format}{characer specifying column format. See Cell Types at
37 \href{https://handsontable.com/}{Handsontable.js} for the formatting
38 options for each data type. Numeric columns are formatted using
39 \href{https://numbrojs.com}{Numbro.js}.}
40
41 \item{source}{a vector of choices for select, dropdown and autocomplete
42 column types}
43
44 \item{strict}{logical specifying whether values not in the \code{source}
45 vector will be accepted}
46
47 \item{readOnly}{logical making the column read-only}
48
49 \item{validator}{character defining a Javascript function to be used
50 to validate user input. See \code{hot_validate_numeric} and
51 \code{hot_validate_character} for pre-build validators.}
52
53 \item{allowInvalid}{logical specifying whether invalid data will be
54 accepted. Invalid data cells will be color red.}
55
56 \item{halign}{character defining the horizontal alignment. Possible
57 values are htLeft, htCenter, htRight and htJustify}
58
59 \item{valign}{character defining the vertical alignment. Possible
60 values are htTop, htMiddle, htBottom}
61
62 \item{renderer}{character defining a Javascript function to be used
63 to format column cells. Can be used to implement conditional formatting.}
64
65 \item{copyable}{logical defining whether data in a cell can be copied using
66 Ctrl + C}
67
68 \item{dateFormat}{character defining the date format. See
69 \href{https://github.com/moment/moment}{Moment.js} for details.}
70
71 \item{default}{default column value for new rows (NA if not specified; shiny only)}
72
73 \item{language}{locale passed to \href{https://numbrojs.com}{Numbro.js};
74 default is 'en-US'.}
75
76 \item{...}{passed to handsontable}
77 }
78 \description{
79 Configure single column.
80 }
81 \examples{
82 library(rhandsontable)
83 DF = data.frame(val = 1:10, bool = TRUE, big = LETTERS[1:10],
84 small = letters[1:10],
85 dt = seq(from = Sys.Date(), by = "days", length.out = 10),
86 stringsAsFactors = FALSE)
87
88 rhandsontable(DF, rowHeaders = NULL) \%>\%
89 hot_col(col = "big", type = "dropdown", source = LETTERS) \%>\%
90 hot_col(col = "small", type = "autocomplete", source = letters,
91 strict = FALSE)
92 }
93 \seealso{
94 \code{\link{hot_cols}}, \code{\link{hot_rows}}, \code{\link{hot_cell}}
95 }