if (FALSE) {
library(dplyr)
# src is a src_sqlite
src <- hy_src(hydat_path = hy_test_db())
src_tbls(src)
# to get a table, use dplyr::tbl()
tbl(src, "STATIONS")
# one you're sure the results are what you want
# get a data.frame using collect()
tbl(src, "STATIONS") |>
filter(PROV_TERR_STATE_LOC == "BC") |>
collect()
# close the connection to the database
hy_src_disconnect(src)
}
Run the code above in your browser using DataLab