Go to the appex-09-[GITHUB USERNAME] repo, clone it, and
start a new project in RStudio.
library(tidyverse)
addresses <- c("24 Merchants Row", "30 Seymour St.", "3 Mill St.", "111 Maple St.", "7 Bakery Ln.")
Create your own string vector called name_parts which
holds at least two elements: your first name, your middle name (if you
have one), and your last name. Please type them all in
lowercase letters.
Remember: a vector is created using the c()
function, where the components are separated by commas.
Combine the elements of name_parts into a single string
separated by spaces. Name this new string my_name.
Capitalize the first letter of each character in
name_parts.
Now we will work a vector called addresses:
addresses
## [1] "24 Merchants Row" "30 Seymour St." "3 Mill St." "111 Maple St."
## [5] "7 Bakery Ln."
Obtain the number of characters in each string of
addresses.
Select the elements from addresses that end in
“St.”.
Pull or access only the numeric part of addresses
(i.e. the entire address number for each element).