Learn R Programming

flattabler (version 1.0.0)

set_page: Set page information to a pivot_table object

Description

Define the page information associated with a pivot table. Previously existing information is replaced by new information.

Usage

set_page(pt, row = 0, col = 0, page = "")

# S3 method for pivot_table set_page(pt, row = 0, col = 0, page = "")

Arguments

pt

A pivot_table object.

row, col

A cell (row and column number), page information included in the table.

page

A string, page information.

Value

A pivot_table object.

Details

Each pivot table implements a report. The pivot table page represents the context of that report. It is useful when we work with several pivot tables with the same structure: for example, the page can allow us to differentiate their origin, date or author. This information is often included in the file name, sheet name, or a cell attached to the pivot table.

Examples

Run this code
# NOT RUN {
library(tidyr)

pt <- pt_m4 %>% set_page(1, 1)

pt <- pt_m4 %>% set_page(page = "M4")

# }

Run the code above in your browser using DataLab