mode_est: Neighbor aggregates

Description Usage Arguments Value Examples

View source: R/impute_nbrs.R

Description

Neighbor aggregates

Usage

1
2
3
4
5
mode_est(x, random_ties = FALSE)

medn_est(x)

medn_est_conserve(x)

Arguments

x

a vector of character or integer values for mode_est. For medn_est, only integer values are allowed.

random_ties

a logical value indicating whether ties should be broken at random when two values occur at the same frequency in x.

Value

an aggregate scalar with the same type as x.

Examples

1
2
3
4
5
x <- c('a', 'a', 'b')
mode_est(x)

x <- c(1L, 1L, 2L)
medn_est(x)

bcjaeger/ipa documentation built on May 7, 2020, 9:45 a.m.