Listed is a pdf with the best sorted movies with a rating of over 5.0, comedy genre, and from the year 2015.
movies <- read.csv(file="IMDBMovies.csv")
glimpse(movies)
## Rows: 999
## Columns: 8
## $ Title <chr> "Guardians of the Galaxy", "Prometheus", "Split", "Sing", …
## $ Genre <chr> "Action", "Adventure", "Horror", "Animation", "Action", "A…
## $ Description <chr> "A group of intergalactic criminals are forced to work tog…
## $ Director <chr> "James Gunn", "Ridley Scott", "M. Night Shyamalan", "Chris…
## $ Actors <chr> "Chris Pratt, Vin Diesel, Bradley Cooper, Zoe Saldana", "N…
## $ Year <int> 2014, 2012, 2016, 2016, 2016, 2016, 2016, 2016, 2016, 2016…
## $ Runtime <int> 121, 124, 117, 108, 123, 103, 128, 89, 141, 116, 133, 127,…
## $ Rating <dbl> 8.1, 7.0, 7.3, 7.2, 6.2, 6.1, 8.3, 6.4, 7.1, 7.0, 7.5, 7.8…
new_r <- filter(movies, Rating>5.0, Genre=="Comedy", Year==2015)
nrow(new_r)
## [1] 22
You can also embed plots, for example:
sorts_movie <- arrange(movies, Rating)
glimpse(sorts_movie)
## Rows: 999
## Columns: 8
## $ Title <chr> "Disaster Movie", "Dragonball Evolution", "Tall Men", "The…
## $ Genre <chr> "Comedy", "Action", "Fantasy", "Crime", "Action", "Drama",…
## $ Description <chr> "Over the course of one evening, an unsuspecting group of …
## $ Director <chr> "Jason Friedberg", "James Wong", "Jonathan Holbrook", "Fem…
## $ Actors <chr> "Carmen Electra, Vanessa Lachey,Nicole Parker, Matt Lanter…
## $ Year <int> 2008, 2009, 2016, 2016, 2015, 2016, 2016, 2016, 2016, 2016…
## $ Runtime <int> 87, 85, 133, 104, 83, 130, 85, 85, 91, 103, 101, 125, 103,…
## $ Rating <dbl> 1.9, 2.7, 3.2, 3.5, 3.5, 3.7, 3.7, 3.9, 3.9, 3.9, 4.0, 4.1…
best_sorts <- arrange(movies, desc(Rating))
glimpse(best_sorts)
## Rows: 999
## Columns: 8
## $ Title <chr> "The Dark Knight", "Inception", "Dangal", "Interstellar", …
## $ Genre <chr> "Action", "Action", "Action", "Adventure", "Animation", "B…
## $ Description <chr> "When the menace known as the Joker wreaks havoc and chaos…
## $ Director <chr> "Christopher Nolan", "Christopher Nolan", "Nitesh Tiwari",…
## $ Actors <chr> "Christian Bale, Heath Ledger, Aaron Eckhart,Michael Caine…
## $ Year <int> 2008, 2010, 2016, 2014, 2016, 2011, 2006, 2006, 2012, 2014…
## $ Runtime <int> 152, 148, 161, 169, 106, 112, 130, 151, 164, 107, 137, 165…
## $ Rating <dbl> 9.0, 8.8, 8.8, 8.6, 8.6, 8.6, 8.5, 8.5, 8.5, 8.5, 8.5, 8.5…
best_movies <- best_sorts[1:10,]
glimpse(best_movies)
## Rows: 10
## Columns: 8
## $ Title <chr> "The Dark Knight", "Inception", "Dangal", "Interstellar", …
## $ Genre <chr> "Action", "Action", "Action", "Adventure", "Animation", "B…
## $ Description <chr> "When the menace known as the Joker wreaks havoc and chaos…
## $ Director <chr> "Christopher Nolan", "Christopher Nolan", "Nitesh Tiwari",…
## $ Actors <chr> "Christian Bale, Heath Ledger, Aaron Eckhart,Michael Caine…
## $ Year <int> 2008, 2010, 2016, 2014, 2016, 2011, 2006, 2006, 2012, 2014
## $ Runtime <int> 152, 148, 161, 169, 106, 112, 130, 151, 164, 107
## $ Rating <dbl> 9.0, 8.8, 8.8, 8.6, 8.6, 8.6, 8.5, 8.5, 8.5, 8.5