allocation-methods: Tidy and glance methods for allocations

tidy.fieldopt_multi_allocationR Documentation

Tidy and glance methods for allocations

Description

tidy() returns one row per stratum, frame or stage; glance() one row with the totals.

Usage

## S3 method for class 'fieldopt_multi_allocation'
tidy(x, ...)

## S3 method for class 'fieldopt_multi_allocation'
glance(x, ...)

## S3 method for class 'fieldopt_allocation'
tidy(x, ...)

## S3 method for class 'fieldopt_allocation'
glance(x, ...)

## S3 method for class 'fieldopt_dual_frame'
tidy(x, ...)

## S3 method for class 'fieldopt_dual_frame'
glance(x, ...)

## S3 method for class 'fieldopt_two_stage'
tidy(x, ...)

## S3 method for class 'fieldopt_two_stage'
glance(x, ...)

Arguments

x

A fieldopt_allocation, fieldopt_dual_frame or fieldopt_two_stage.

...

Unused.

Value

A tibble.

Examples

strata <- data.frame(
  stratum = c("list", "area"), size = c(2000, 800),
  sd = c(12, 30), cost = c(40, 180)
)
a <- frame_allocation(strata, budget = 20000)
tidy(a)
glance(a)

fieldopt documentation built on Oct. 22, 2026, 1:07 a.m.