Learn R Programming

beezdemand (version 0.2.0)

beezdemand_empirical_methods: S3 Methods for beezdemand_empirical Objects

Description

Methods for printing, summarizing, and visualizing objects of class beezdemand_empirical created by get_empirical_measures().

Usage

# S3 method for beezdemand_empirical
print(x, ...)

# S3 method for beezdemand_empirical summary(object, ...)

# S3 method for beezdemand_empirical plot(x, type = "histogram", ...)

Value

  • print() - Returns the object invisibly (called for side effects)

  • summary() - Returns a list with extended summary information

  • plot() - Returns a ggplot2 object

Arguments

x, object

A beezdemand_empirical object

...

Additional arguments passed to plotting functions

type

Character string specifying plot type. Options:

  • "histogram" (default) - Faceted histograms showing distribution of each measure

  • "matrix" - Scatterplot matrix showing pairwise relationships between measures

Details

Summary Method

Provides extended information including:

  • Data summary (subjects, zero consumption patterns, completeness)

  • Descriptive statistics for each empirical measure (min, median, mean, max, SD)

  • Missing data patterns

Plot Method

Creates visualizations of empirical measures across subjects.

Histogram type (default):

  • Six-panel faceted plot showing distribution of each measure

  • Helps identify central tendencies and outliers

  • Uses modern beezdemand styling

Matrix type:

  • Scatterplot matrix (pairs plot) showing relationships between measures

  • Useful for identifying correlated demand metrics

  • Lower triangle: scatterplots with smoothed trend lines

  • Diagonal: density plots

  • Upper triangle: correlation coefficients

See Also

get_empirical_measures()

Examples

Run this code
# \donttest{
data(apt, package = "beezdemand")
emp <- get_empirical_measures(apt)

# Print compact summary
print(emp)

# Extended summary
summary(emp)

# Histogram of measure distributions
plot(emp)

# Scatterplot matrix
plot(emp, type = "matrix")
# }

Run the code above in your browser using DataLab