addcod: append a '$cod' column if missing

Description Usage Arguments Value

View source: R/utils.R

Description

Only handles the case of missing $cod splitting variable for data of a single year/region. This is not super robust. If you have many regions or whatever then do it yourself. This function was just written to make ggb() robust to the case of a user specifying data that don't have any territorial or other subgroups, aside from sex.

Usage

1
addcod(X)

Arguments

X

a data.frame, possibly but not necessarily with column $sex.

Value

X with a new column, $cod appended.


DDM documentation built on May 2, 2019, 6:16 a.m.

Related to addcod in DDM...