Using the connection given in con
, create a database including a few tables
from the nycflights13
dataset.
Value
the connection given in con
invisibly, generally called for the
side effects of writing to the database
Examples
# \donttest{
if (check_for_pkg("RSQLite", message)) {
con <- DBI::dbConnect(RSQLite::SQLite(), ":memory:")
nycflights13_create_sql(con)
DBI::dbGetQuery(
con,
"SELECT year, month, day, carrier, flight, tailnum FROM flights LIMIT 10"
)
DBI::dbDisconnect(con)
}
#> Creating the testing database from nycflights13
#> Creating table: airlines
#> Creating table: airports
#> Creating table: flights
#> Creating table: planes
#> Creating table: weather
# }