add_editable_column {tableHTML} | R Documentation |
Make columns Editable
Description
add_editable_column
will make the specified columns editable
Usage
add_editable_column(tableHTML, columns)
Arguments
tableHTML |
A tableHTML object created by the tableHTML function. |
columns |
A character atomic vector with the names of the columns or a numeric atomic vector with the positions of the columns where the style definitions will be applied on. At least one column must be provided. If the rownames are included the column name is "tableHTML_rownames" and the position is 0. If row_groups are are included the column name is "tableHTML_row_groups" and the position is -1. |
Value
A tableHTML object.
Examples
tableHTML(mtcars) %>%
add_editable_column(columns = 'mpg')
tableHTML(mtcars,
rownames = TRUE,
widths = c(150, 100, rep(50, 11)),
row_groups = list(c(10, 10, 12), c('Group 1', 'Group 2', 'Group 3'))) %>%
add_css_column(css = list('background-color', 'lightgray'), columns = 'row_groups') %>%
add_css_column(css = list('text-align', 'right'), columns = 'row_groups') %>%
add_css_header(css = list('background-color', 'lightgray'), headers = 1) %>%
add_editable_column(columns = -1:3)
[Package tableHTML version 2.1.2 Index]