## Create a new workbook
wb <- wb_workbook("Kenshin")
## Add some worksheets
wb$add_worksheet("Sheet 1")
wb$add_worksheet("Sheet 2")
wb$add_worksheet("Sheet 3")
wb$add_worksheet("Sheet 4")
## Freeze Panes
wb$freeze_pane("Sheet 1", firstActiveRow = 5, firstActiveCol = 3)
wb$freeze_pane("Sheet 2", firstCol = TRUE) ## shortcut to firstActiveCol = 2
wb$freeze_pane(3, firstRow = TRUE) ## shortcut to firstActiveRow = 2
wb$freeze_pane(4, firstActiveRow = 1, firstActiveCol = "D")
Run the code above in your browser using DataLab