pp_round: Rounding Function

View source: R/pp_round.R

pp_roundR Documentation

Rounding Function

Description

Rounding Function

Usage

pp_round(x, tpop, spop, sid)

Arguments

x

An object of class sf obtained by the pp_estimate function

tpop

Target population estimates obtained by the pp_estimate function

spop

Initial source population values (included after the implementation of the pp_estimate function)

sid

Source identification number

Value

An object of class sf including rounded population counts stored in a new column called pp_int

Examples

# read lib data
data('src')
data('trg')

# areal weighted interpolation - awi
awi <- pp_estimate(trg, src, sid = sid, spop = pop,
    method = awi)

# volume weighted interpolation - vwi
vwi <- pp_estimate(trg, src, sid = sid, spop = pop,
    method = vwi, volume = floors)

# awi - round
pp_round(awi, tpop = pp_est, spop = pop, sid = sid)

# vwi - round
pp_round(vwi, tpop = pp_est, spop = pop, sid = sid)


populR documentation built on March 31, 2023, 9:11 p.m.