fgeo.tool (version 1.2.5)

rename_matches: Rename an object based on case-insensitive match of the names of a reference.

Description

Rename an object based on case-insensitive match of the names of a reference.

Usage

rename_matches(x, y)

Arguments

x

x object which names to restored if they match the reference.

y

Named object to use as reference.

Value

The output is x with as many names changed as case-insensitive matches there are with the reference.

See Also

Other functions for developers: check_crucial_names, extract_insensitive, flag_if_group, is_multiple, nms_try_rename, type_ensure

Other general functions to deal with names: extract_insensitive

Examples

Run this code
# NOT RUN {
ref <- data.frame(COL1 = 1, COL2 = 1)
x <- data.frame(col1 = 5, col2 = 1, n = 5)
rename_matches(x, ref)
# }

Run the code above in your browser using DataLab