salutation: Get or set a name's saltation

Description Usage Arguments See Also Examples

Description

as in the lubridate package, individual components of a name can be both extracted or set using the relevant function call - see the examples. In the event that you attempt to set a component to NA, no modification will be made; in the event that you try to get a component that isn't present, an NA will be returned.

Usage

1
2
3
salutation(x)

salutation(x) <- value

Arguments

x

a name, or vector of names

value

a replacement value for x's salutation

See Also

first_name, middle_name, last_name and suffix for other accessors.

Examples

1
2
3
4
5
6
#Get a salutation
example_name <- "Mr Jim Jeffries"
salutation(example_name)

#Set a salutation
salutation(example_name) <- "Prof"

Ironholds/humaniformat documentation built on May 7, 2019, 6:40 a.m.