apply_r2: Apply Excel secondary row style.

View source: R/openxlsx-functions.R

apply_r2R Documentation

Apply Excel secondary row style.

Description

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

Usage

apply_r2(
  wb,
  sheet,
  table = NULL,
  style = r2(),
  rows = 2:(nrow(table) + 1) %>% .[which(.%%2 == 1)],
  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(s)

Ayush Noori


ayushnoori/brainstorm documentation built on April 14, 2025, 4:12 p.m.