rudeboybert / fivethirtyeight

R package of data and code behind the stories and interactives at FiveThirtyEight
https://fivethirtyeight-r.netlify.app/
Other
454 stars 104 forks source link

Have function to install {fivethirtyeightdata} package in {fivethirtyeight} #95

Open ismayc opened 3 years ago

ismayc commented 3 years ago

While it is easy to run install.packages('fivethirtyeightdata', repos = 'https://fivethirtyeightdata.github.io/drat/', type = 'source'), it would be simpler to have something like a get_larger_datasets() function that we could have pop up after people have run library(fivethirtyeight) as a message letting them know. The function could just directly be a wrapper as well:

get_larger_datasets <- function() {
    install.packages(
        'fivethirtyeightdata', 
        repos = 'https://fivethirtyeightdata.github.io/drat/', 
        type = 'source'
    )
    message("Remember to use `library(fivethirtyeightdata)` to retrieve any of these larger datasets.")
}