Description Usage Arguments Value Examples
View source: R/main_function.R
Download Information on Box Office Results for Movies
1 |
dates |
A vector of dates to scrape |
site |
Whether you want to get data from boxofficemojo.com or the-numbers.com. Accepts inputs of "numbers" (default) or "mojo". |
top_n |
The number of results to return for each day. If NULL (default) returns all results, otherwise just top n results (e.g. top_n = 5, returns 5 top movies per date). |
Data frame returning info on the name of the movie, its daily gross, gross-to-date, and gross-per-theater for each date inputted.
1 2 3 4 5 6 7 8 9 10 | # Uses the-numbers.com website.
boxoffice(dates = as.Date("2017-12-25"))
# Uses boxofficemojo.com website.
boxoffice(dates = as.Date("2017-12-25"), site = "mojo")
# Returns only top 10 (daily) grossing movies
boxoffice(dates = as.Date("2017-12-25"), top_n = 10)
# Uses the dates of Christmas and New Years Eve 2017
boxoffice(dates = as.Date(c("2017-12-25", "2017-12-31")))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.