Learn R Programming

regexr (version 1.1.0)

set_names: Set the Names in a regexr Object

Description

This is a convenience function that sets the names on a regexr object and returns the object. This function works the same as setNames but provides a naming which is consistent with set_regex and set_comments.

Usage

set_names(x, y)

Arguments

x
The regexr object.
y
The names to assign.

Value

Returns a regexr object.

See Also

setNames

Examples

Run this code
minimal <- construct("a", "b", "c")
out <- set_names(minimal, 1:3)
names(out)

Run the code above in your browser using DataLab