Skip to contents

Produces a quick visual summary of a creel_design object:

  • Without counts attached (design$counts is NULL): a bar chart showing the number of sampled days per stratum.

  • With counts attached: a jitter + crossbar chart showing the distribution of count values per stratum.

Both variants colour bars/points by stratum for easy differentiation.

Usage

plot_design(design, title = NULL, ...)

Arguments

design

A creel_design object created by creel_design().

title

Optional character title. Defaults to "Creel Design Summary" (no counts) or "Count Distribution by Stratum" (with counts).

...

Additional arguments (currently ignored).

Value

A ggplot object.

Examples

data(example_calendar)
data(example_counts)

# Without counts — stratum sample sizes
design <- creel_design(example_calendar, date = date, strata = day_type)
plot_design(design)


# With counts — count distribution per stratum
design_with_counts <- add_counts(design, example_counts)
#> Warning: No weights or probabilities supplied, assuming equal probability
plot_design(design_with_counts)
#> Warning: Computation failed in `stat_summary()`.
#> Caused by error in `fun.data()`:
#> ! The package "Hmisc" is required.