Skip to contents

Extract words from author

Usage

author_words(author)

Arguments

author

Author that wants splitting into words.

Value

Words contained in the author.

Details

From the string author we extract any words that begin with a capital and is followed by at least two lower case letters or hyphens. Or the special cases DC., Sm. and Br.. In the special cases \\ will be added before . to allow regular expression searching of the authors such as grepl("DC\\.", "Some Author"). We have not included L. since this could be mistaken for an initial of another author rather than Carl Linnaeus.

This function is used when comparing authors in author_check().

Examples

author_words('(Jacq.) Schott')
#> [1] "Jacq"   "Schott"
author_words('Villarroel & J.R.I.Wood')
#> [1] "Villarroel" "Wood"      
author_words('(DC.) F.Muell.')
#> [1] "Muell" "DC\\."