Soft-deprecated lifecycle

tidy_names(), set_tidy_names(), and repair_names() were early efforts to facilitate post hoc name repair in tibble, given that tibble() and as_tibble() did not do this.

From tibble v2.0.0, the .name_repair argument gives direct access to three specific levels of name repair: minimal, unique, and universal. We recommend that new code use this instead of tidy_names(), set_tidy_names(), or repair_names(). After a period of use, the repair stategies behind minimal, unique, and universal are likely to be exposed in standalone functions and this could affect the behaviour of tidy_names(). repair_names() should be considered deprecated.

tibble(..., `.name_repair = "unique"`)
## is preferred to
df <- tibble(...)
set_tidy_names(df, syntactic = FALSE)

    tibble(..., `.name_repair = "universal"`)
## is preferred to
df <- tibble(...)
set_tidy_names(df, syntactic = TRUE)
tidy_names(name, syntactic = FALSE, quiet = FALSE)

set_tidy_names(x, syntactic = FALSE, quiet = FALSE)

repair_names(x, prefix = "V", sep = "")

Arguments

name

A names attribute, usually a character vector.

syntactic

Should names be made syntactically valid? If FALSE, uses same logic as .name_repair = "unique". If TRUE, uses same logic as .name_repair = "universal".

quiet

Whether to suppress messages about name repair.

x

A vector.

prefix

A string, the prefix to use for new column names.

sep

A string inserted between the column name and de-duplicating number.

Value

x with repaired names or a repaired version of name.