This function can only be used inside another styling function, since the row_id and col_id calculation happens in the level-2 parent.frame.

set_specific_style(st, value, style_name, style_type, ...)

# S4 method for StyledTable,ANY,character,character
set_specific_style(st,
  value, style_name, style_type, row_id = NULL, col_id = NULL,
  condition = NULL, condition_text = NULL, append_mode = "replace")

Arguments

st

A StyledTable object

value

The value that should be set

style_name

The name of the style slot that should be set

style_type

The type which the value has to have (used for type checking)

...

Various arguments

row_id

A vector of row ids to which the change should be applied to. The variable n_row can be used in the expression to name the total number of columns (will be replaced). If the argument row_id is omitted, then the change will be applied to all rows

col_id

A vector of column ids to which the change should be applied to. The variable n_col can be used in the expression to name the total number of columns (will be replaced). If the argument col_id is omitted, then the change will be applied to all columns

condition

An equation (non standard evaluation) that is evaluated on the data.frame data in order to decide on which rows or cells the change should be applied. In the equation the column names of the StyledTable object should be used. Be aware that the StyledTable object columns have the names X1, ..., XN, where N is the total number of columns. If you do not want to apply the change to all columns given in the col_id argument, but only to single cells which fullfill a special condition you can use also the variable name X which is substituted by each column name separately. The arguments condition_text and condition cannot be passed at the same time.

condition_text

An character string holding an equation that is evaluated on the data.frame data in order to decide on which rows or cells the change should be applied. In the equation the column names of the StyledTable object should be used. Be aware that the StyledTable object columns have the names X1, ..., XN, where N is the total number of columns. If you do not want to apply the change to all columns given in the col_id argument, but only to single cells which fullfill a special condition you can use also the variable name X which is substituted by each column name separately. The arguments condition_text and condition cannot be passed at the same time.

append_mode

A character string that defines if the styling value of the cell should be replaced (append_mode = "replace"), if the new styling should be appended at the end of the current styling value of the cell (append_mode = "appendBehind"), if the new styling should be appended in front of the current styling value of the cell (append_mode = "appendBefore")

Value

The modified StyledTable object

See also