state_freq: Print, Plot, and Convert a state_freq Object

state_freqR Documentation

Print, Plot, and Convert a state_freq Object

Description

plot_state_frequencies() returns a state_freq object holding both the rendered chart and the tidy frequency table. print() shows the table in the console, plot() renders the chart, and as.data.frame() returns the tidy table for downstream piping.

Usage

## S3 method for class 'state_freq'
print(x, digits = 1, max_states = 20L, ...)

## S3 method for class 'state_freq'
plot(x, ...)

## S3 method for class 'state_freq'
as.data.frame(x, ...)

Arguments

x

A state_freq object.

digits

Number of decimal places for proportion / share columns.

max_states

Cap on rows shown per group in the per-state table. The full table remains available via x$table.

...

Unused.

Value

print() returns invisible(x); plot() returns invisible(NULL) after drawing; as.data.frame() returns x$table.


Nestimate documentation built on July 11, 2026, 1:09 a.m.