Extracts correct component from a splitted affiliation address
Source:R/split_address.R
extract_split_address.Rd
Extracts correct component from a splitted affiliation address
Arguments
- splitted.address
The address splitted with stringr::str_split.
- string
The keyword to determine which string component to keep.
Examples
address <- c(
"Department of Psychology",
" Cornell University",
" Ithaca",
" New York 14853-7601."
)
extract_split_address(address, "University")
#> [1] NA "Cornell University" NA
#> [4] NA
extract_split_address(address, "Department")
#> [1] "Department of Psychology" NA
#> [3] NA NA