Learn R Programming

nonprobsampling (version 0.1.0)

sort_by_sp_size: Sort reference samples by size

Description

Sort reference samples by size

Usage

sort_by_sp_size(sp, vars, weight, design, sp_order, verbose = FALSE)

Value

A list with components:

sp

Reordered list of reference sample data frames.

vars

Reordered list of predictor variable name vectors.

weight

Reordered character vector of weight column names.

design

Reordered list of survey design objects.

order_used

Integer vector giving the reordering index.

log

Character vector of log messages describing the ordering.

Arguments

sp

List of reference sample data frames.

vars

List of character vectors of predictor variable names, one per element of `sp`.

weight

Character vector of survey-weight column names, one per element of `sp`.

design

List of `survey.design2` or `svyrep.design` objects, one per element of `sp`.

sp_order

Character scalar. `"size"` reorders reference samples largest-first; `"given"` keeps the user-supplied order.

verbose

Logical. If `TRUE`, a summary of the ordering is printed.