| abbrev | R Documentation |
abbrev returns a character vector of each words first capital letters for each element of x.
abbrev(x, exceptions = NULL)
x |
vector of strings to be abbreviated. |
exceptions |
list with two names vectors: |
This function returns a same-length character vector
that abbrevs an initial character vector, x. Abbreviation returns the first
capital letter of any words in each element of x. Users may additionally pass
abbrev an optional list of exceptions that overides the default abbreviations.
The list of exceptions requires a vector of "old" values to be replaced by "new" values
a character vector of length(x).
x<-c("KIPP Ascend Middle School", "KIPP Ascend Primary School",
"KIPP Create College Prep",
"KIPP Bloom College Prep" ,
"KIPP One Academy")
abbrev(x)
altnames<-list(old=c("KAPS", "KBCP", "KOA"),
new=c("KAP", "Bloom", "One"))
abbrev(x, exceptions=altnames)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.