make_names {iNZightTools} | R Documentation |
Make unique variable names
Description
Helper function to create new variable names that are unique given a set of existing names (in a data set, for example). If a variable name already exists, a number will be appended.
Usage
make_names(new, existing = character())
Arguments
new |
a vector of proposed new variable names |
existing |
a vector of existing variable names |
Value
a vector of unique variable names
Author(s)
Tom Elliott
Examples
make_names(c("var_x", "var_y"), c("var_x", "var_z"))
[Package iNZightTools version 2.0.1 Index]