sector_update: Update sectoring scheme with crosswalk table

Description Usage Arguments See Also Examples

View source: R/sector.R

Description

Update sectoring scheme with crosswalk table

Usage

1
2
3
4
5
6
7
sector_update(
  scheme_old,
  crosswalk,
  description_new,
  id_old = "sector536",
  id_new = "sector546"
)

Arguments

scheme_old

data frame that holds old sectoring scheme

crosswalk

data frame for converting between new and old sectors

description_new

data frame that contains descriptions for new sectors

id_old

id_old variable name for the old sector id

id_new

variable name for the new sector id

See Also

Other functions to get spending by implan sector: check_share_sums(), check_spend_sums()

Examples

1
2
3
4
5
6
7
8
9
# load sample data
data(category_to_sector536, sector536_to_sector546, sectors546)

# check the sector allocation for the 536 sector scheme (should be TRUE)
check_share_sums(category_to_sector536, share, category)

# update to 546 sector scheme and check
category_to_sector546 <- sector_update(category_to_sector536, sector536_to_sector546, sectors546)
check_share_sums(category_to_sector546, share, category)

southwick-associates/implan documentation built on Feb. 28, 2020, 10:45 a.m.