Description Usage Arguments Details Value Examples
Create a data-only R pacakge of flights data, like nycflights13, but with user-specified airports, years, and direction (departing, arriving).
1 2 3 4 5 6 | download_flightdata(airport_codes, year, data_dir = "./data",
raw_dir = "./data-raw", origin = TRUE, dest = FALSE,
all_weather = FALSE)
create_flights(path, airport_codes, year, origin = TRUE, dest = FALSE,
all_weather = FALSE, description = getOption("devtools.desc"))
|
airport_codes |
A character vector of airport codes |
year |
Year of flights to download. |
data_dir |
Directory to save |
raw_dir |
Directory to save |
origin, dest |
If |
all_weather |
If |
path |
Location to create new package. The last component of the path will be used as the package name. |
description |
A |
The function create_flights
creates an R package with the flight data.
The function download_flightdata
downloads the data and saves .csv
and .rda
files to specified directories, but does not create an R package.
A "package"
object for the created package.
This function is called for
the side-effect of downloading the data and creating a package.
1 2 3 4 5 6 | ## Not run:
# Package with all flights departing from or arriving
# at Seattle (SEA) in 2015.
create_flights("seaflights15", "SEA", 2015, origin = TRUE, dest = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.