--4-The apply family
#Have a look at the strsplit() calls,
#that splits the strings in pioneers on the : sign.
#The result, split_math is a list of 4 character vectors:
#the first vector element represents the name, the second element the birth year.
#Use lapply() to convert the character vectors in split_math to lowercase letters:
#apply tolower() on each of the elements in split_math. Assign the result,
#which is a list, to a new variable split_low.
#Finally, inspect the contents of split_low with str().
# The vector pioneers has already been created for you
pioneers <- c("GAUSS:1777", "BAYES:1702", "PASCAL:1623", "PEARSON:1857")
# Split names from birth year
split_math <- strsplit(pioneers, split = ":")
# Convert to lowercase strings: split_low
split_low<-lapply(split_math,FUN=tolower)
# Take a look at the structure of split_low
str(split_low)Last updated