last_name: Get or set a name's last name

Description Usage Arguments See Also Examples

View source: R/accessors.R

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.

Usage

1
2
3
last_name(x)

last_name(x) <- value

Arguments

x

a name, or vector of names

value

a replacement value for x's last name.

See Also

salutation, first_name, middle_name and suffix for other accessors.

Examples

1
2
3
4
5
6
#Get a last name
example_name <- "Mr Jim Toby Jeffries"
last_name(example_name)

#Set a last name
last_name(example_name) <- "Smith"

humaniformat documentation built on May 29, 2017, 8:14 p.m.

Search within the humaniformat package
Search all R packages, documentation and source code