Skip to contents

new_name() generates unique names for additional data frame variables ensuring they are not already present.

Usage

new_name(x, n = 1L)

Arguments

x

A data frame.

n

Number of unique names to generate.

Value

A character vector of unique names not already found in x.

Examples


new_name(mtcars)
#> [1] "new16c0163cecad"
new_name(mtcars, 2)
#> [1] "new16c0feeaf7"   "new16c04a34f5dd"