Apply Excel primary row style to odd rows. Depends on the openxlsx package. All arguments have default values and are optional to allow parameters to be modified.

apply_r1(
  wb,
  sheet,
  table = NULL,
  style = r1(),
  rows = 2:(nrow(table) + 1) %>% .[which(.%%2 == 0)],
  cols = 1:ncol(table),
  grid = T,
  stack = F
)

Arguments

wb

openxlsx Workbook object.

sheet

Worksheet name.

table

Table for specified worksheet. If both rows and cols are specified, then this argument is optional.

style

openxlsx style object generated by brainstorm::r1().

rows

Rows to apply style to, optional if table is specified..

cols

Columns to apply style to, optional if table is specified..

grid

See gridExpand argument of openxlsx::addStyle().

stack

See stack argument of openxlsx::addStyle().

Author

Ayush Noori