Learn R Programming

rhandsontable (version 0.3.8)

rhandsontable: Handsontable widget

Description

Create a Handsontable.js widget.

Usage

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

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab