F1dbConnect: Connect to an existing F1 database

View source: R/db.R

F1dbConnectR Documentation

Connect to an existing F1 database

Description

Establishes a connection to a 'DuckDB' or 'SQLite' database previously created by createF1db.

Usage

F1dbConnect(file = "f1_db.duckdb")

Arguments

file

path to the database file

Value

an object of class duckdb_connection or SQLiteConnection

Examples

## Not run: 
# a file "f1_db.duckdb" already exists in the working directory
con <- F1dbConnect()
dbListFields(con)
circuits <- dbReadTable(con, "circuits")

## End(Not run)

arkraieski/formula1data documentation built on March 24, 2024, 4:26 p.m.