pps_action: pps action

Description Usage Arguments Author(s) Examples

View source: R/pps_action.R

Description

Return probabilities proportional to size

Usage

1
pps_action(size_vec, the_n)

Arguments

size_vec

a vector of size

the_n

sample size n – the sum of the resulted probabilities

Author(s)

Lingyun (Larry) Zhang lyzhang10@gmail.com

Examples

1
2
3
a_vec <- c(6, 8, 1, 2, 3, 1, 1, 1)
(y <- pps_action(size_vec = a_vec, the_n = 4))
(sum(y))

zhanglynz/myhelper documentation built on Sept. 26, 2021, 3:33 a.m.