| salutation {humaniformat} | R Documentation |
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.
salutation(x) salutation(x) <- value
x |
a name, or vector of names |
value |
a replacement value for x's salutation |
first_name, middle_name, last_name
and suffix for other accessors.
#Get a salutation example_name <- "Mr Jim Jeffries" salutation(example_name) #Set a salutation salutation(example_name) <- "Prof"