# >
Strings
For these exercises, we’ll use the dog breed traits data set.
- Load tidyverse and import
dog_breed_traits_clean.csv
totraits
.
- Return the first ten letters of the alphabet in upper case.
# >
- Create this character string and assign it to
mystring
: The elephant said “Hello” then ‘Bye!’ Then view how it would be printed.
# >
- Find how many characters are in
mystring
.
# >
- Create a vector of the first four characters of the coat_length column from
traits
.
# >
- Convert the breed column of
traits
to sentence case.
# >
- Create series of sentences using breed and coat_length that states “[insert breed name] have a [insert coat length] coat” that uses the proper cases.
# >
- In the
mtcars
data set, extract the first two digits of the mpg variable and the last three digits of the car names and combine them into a single string.
# >
- Print the
fruit
data set, then capitalize all first word letters in the data set, then capitalize all words in the data set.
# >