salutation {humaniformat}R Documentation

Get or set a name's saltation

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

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

#Get a salutation
example_name <- "Mr Jim Jeffries"
salutation(example_name)

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

[Package humaniformat version 0.6.0 Index]