Clone a repo + start a new project

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.")

Exercise 1

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.

Exercise 2

Combine the elements of name_parts into a single string separated by spaces. Name this new string my_name.

Exercise 3

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."

Exercise 4

Obtain the number of characters in each string of addresses.

Exercise 5

Select the elements from addresses that end in “St.”.

Exercise 6: Optional stretch goal!

Pull or access only the numeric part of addresses (i.e. the entire address number for each element).