7.3 Test your R Might!: Movie data
Table 7.2 contains data about 10 of my favorite movies.
movie | year | boxoffice | genre | time | rating |
---|---|---|---|---|---|
Whatever Works | 2009 | 35.0 | Comedy | 92 | PG-13 |
It Follows | 2015 | 15.0 | Horror | 97 | R |
Love and Mercy | 2015 | 15.0 | Drama | 120 | R |
The Goonies | 1985 | 62.0 | Adventure | 90 | PG |
Jiro Dreams of Sushi | 2012 | 3.0 | Documentary | 81 | G |
There Will be Blood | 2007 | 10.0 | Drama | 158 | R |
Moon | 2009 | 321.0 | Science Fiction | 97 | R |
Spice World | 1988 | 79.0 | Comedy | -84 | PG-13 |
Serenity | 2005 | 39.0 | Science Fiction | 119 | PG-13 |
Finding Vivian Maier | 2014 | 1.5 | Documentary | 84 | Unrated |
Create new data vectors for each column.
What is the name of the 10th movie in the list?
What are the genres of the first 4 movies?
Some joker put Spice World in the movie names – it should be ``The Naked Gun’’ Please correct the name.
What were the names of the movies made before 1990?
How many movies were Dramas? What percent of the 10 movies were Dramas?
One of the values in the
time
vector is invalid. Convert any invalid values in this vector to NA. Then, calculate the mean movie timeWhat were the names of the Comedy movies? What were their boxoffice totals? (Two separate questions)
What were the names of the movies that made less than $50 Million dollars AND were Comedies?
What was the median boxoffice revenue of movies rated either G or PG?
What percent of the movies were rated R OR were comedies?