Learn R Programming

flattabler (version 2.1.2)

define_labels: Define the quantity of rows and columns that contain labels

Description

A pivot table should only contain label rows and columns, and an array of values, usually numeric data. This function defines the quantity of rows and columns that contain labels.

Usage

define_labels(pt, n_col, n_row)

# S3 method for pivot_table define_labels(pt, n_col, n_row)

Value

A pivot_table object.

Arguments

pt

A pivot_table object.

n_col

A number, quantity of columns containing pivot table labels.

n_row

A number, quantity of rows containing pivot table labels.

See Also

pivot_table

Other pivot table definition functions: get_page(), pivot_table(), set_page()

Examples

Run this code

pt <- pt_ex |> define_labels(n_col = 2, n_row = 2)

Run the code above in your browser using DataLab