rhandsontable: Handsontable widget

Description Usage Arguments Details See Also Examples

View source: R/rhandsontable.R

Description

Create a Handsontable.js widget.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
rhandsontable(
  data,
  colHeaders,
  rowHeaders,
  comments = NULL,
  useTypes = TRUE,
  readOnly = NULL,
  selectCallback = FALSE,
  width = NULL,
  height = NULL,
  digits = 4,
  debug = NULL,
  search = FALSE,
  ...
)

Arguments

data

a data.table, data.frame or matrix

colHeaders

a vector of column names. If missing colnames will be used. Setting to NULL will omit.

rowHeaders

a vector of row names. If missing rownames will be used. Setting to NULL will omit.

comments

matrix or data.frame of comments; NA values are ignored

useTypes

logical specifying whether column classes should be mapped to equivalent Javascript types. Note that Handsontable does not support column add/remove when column types are defined (i.e. useTypes == TRUE in rhandsontable).

readOnly

logical specifying whether the table is editable

selectCallback

logical enabling the afterSelect event to return data. This can be used with shiny to tie updates to a selected table cell.

width

numeric table width

height

numeric table height

digits

numeric passed to jsonlite::toJSON

debug

numeric Javascript log level

search

logical specifying if the data can be searched (see https://jrowen.github.io/rhandsontable/#Customizing and Shiny example in inst/examples/rhandsontable_search)

...

passed to hot_table and to the params property of the widget

Details

For full documentation on the package, visit https://jrowen.github.io/rhandsontable/

See Also

hot_table, hot_cols, hot_rows, hot_cell

Examples

1
2
3
4
5
6
7
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, rowHeaders = NULL)

Example output



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