| beezdemand_descriptive_methods | R Documentation |
Methods for printing, summarizing, and visualizing objects of class
beezdemand_descriptive created by get_descriptive_summary().
## S3 method for class 'beezdemand_descriptive'
print(x, ...)
## S3 method for class 'beezdemand_descriptive'
summary(object, ...)
## S3 method for class 'beezdemand_descriptive'
plot(x, x_trans = "identity", y_trans = "identity", show_zeros = FALSE, ...)
x, object |
A |
... |
Additional arguments (currently unused) |
x_trans |
Character string specifying x-axis transformation. Options:
"identity" (default), "log10", "log", "sqrt". See |
y_trans |
Character string specifying y-axis transformation. Options: "identity" (default), "log10", "log", "sqrt", "pseudo_log" (signed log). |
show_zeros |
Logical indicating whether to show proportion of zeros as labels on the boxplot (default: FALSE) |
Displays a compact summary showing the number of subjects and prices analyzed, plus a preview of the statistics table.
Provides extended information including:
Data summary (subjects, prices analyzed)
Distribution of means across prices (min, median, max)
Proportion of zeros by price (range)
Missing data summary
Creates a boxplot showing the distribution of consumption at each price point. Features:
Red cross markers indicate means
Boxes show median and quartiles
Whiskers extend to 1.5 * IQR
Supports axis transformations (log, sqrt, etc.)
Uses modern beezdemand styling via theme_apa()
print() - Returns the object invisibly (called for side effects)
summary() - Returns a list with extended summary information
plot() - Returns a ggplot2 object
get_descriptive_summary()
data(apt, package = "beezdemand")
desc <- get_descriptive_summary(apt)
# Print compact summary
print(desc)
# Extended summary
summary(desc)
# Default boxplot
plot(desc)
# With log-transformed y-axis
plot(desc, y_trans = "log10")
# With pseudo-log y-axis (handles zeros gracefully)
plot(desc, y_trans = "pseudo_log")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.