Skip to contents

Returns a lazy dplyr tibble reference to the buoy_data table. All dplyr operations are translated to SQL and executed in DuckDB. Call collect() to retrieve results as a data frame.

Usage

buoy_tbl(con, table_name = "buoy_data")

Arguments

con

DBI connection to DuckDB database

table_name

Name of the table (default: "buoy_data")

Value

A lazy tibble (tbl_dbi) for use with dplyr verbs

Examples

if (FALSE) { # \dontrun{
con <- connect_duckdb()
buoy_tbl(con) |>
  dplyr::filter(station_id == "M3", wave_height > 5) |>
  dplyr::select(time, wave_height, hmax) |>
  dplyr::collect()
DBI::dbDisconnect(con)
} # }