Reference no: EM133239987
Using R Studio and the drivers.csv data:
1) Make a new object that consists of only drivers who were born in the 1980s (i.e., 1980 through 1989).
Hint, use filter().
Question: How many drivers were born in the 1980s?
2) Make a new object from drivers, that removes any driver whose first name contains the letter "o" or the letter "i" or the letter "e". Then, group by first name and count how many drivers have each of those remaining first names. Lastly, arrange this object in descending order for the number of occurrences for each name. Hint, use filter with grepl(); then, use group_by() and summarise() with n(); lastly, use
arrange() with desc().
Question: Which first name that is left is the most common?
It will not let me attach the drivers.csv data but here is section of it:
driverID firstName lastName nationality birthYear
1 Lewis Hamilton British 1985
2 Nick Heidfeld German 1977
3 Nico Rosberg. German 1985
4 Fernando Alonso Spanish 1981
5 Heikki Kovalainen Finnish 1981
6 Kazuki Nakajima Japanese 1985
7 Sébastien Bourdais French 1979
8 Kimi Räikkönen Finnish 1979