initials: Create initials from a string containing names

View source: R/util.R

initialsR Documentation

Create initials from a string containing names

Description

initials takes a string containing names, seperated either by spaces of periods, and returns the initials.

Usage

initials(strings, return_NA_on_empty = FALSE)

Arguments

strings

string containing names, seperated by spaces or periods (or both). Vectorised.

Value

Initials in the form JF, so no spaces and no periods.

Examples

strings = c("Auke B.", "Arnold Christoffer", "Arend X. Mark", "Albert X Johannes", "Albert X.Y. Johannes", "J. F.")
initials(strings)

rijpma/capelinker documentation built on Nov. 7, 2024, 3:06 a.m.