inflate_region_names: Make sure that all regions get a name

Description Usage Arguments Value

View source: R/helper_functions.R

Description

The function ensures that if the user didn't specify some region names explicitly, some kind of label would still be generated.

Usage

1
inflate_region_names(reg.names, regions, missing.prefix = "Reg_")

Arguments

reg.names

named character vector, where names correspond to the new region names to be assigned, and the values correspond to current region identifiers

regions

vector of unique region identifiers in the data

missing.prefix

what to prefix to region identifiers for which the user didn't specify names explicitly. Defaults to "Reg_", i.e. if region identifiers are numbers, it would generate something like "Reg_1".

Value

named character vector analogous to reg.names, but with added names for regions for which the user didn't specify names


antonmalko/ettools documentation built on May 28, 2019, 3:35 p.m.