neon_table {neonstore}R Documentation

Return a neon table from the database

Description

Return a neon table from the database

Usage

neon_table(
  table,
  product = NA,
  type = NA,
  site = NA,
  db = neon_db(),
  lazy = FALSE
)

Arguments

table

the name of a downloaded NEON table in the store, see neon_index

product

A NEON productCode or list of product codes, see examples.

type

filter for basic or expanded. Can be omitted unless you have imported both types a given table into your database.

site

4-letter site code(s) to filter on. Leave as NA to search all.

db

a connection to the database, see ⁠[neon_db()]⁠.

lazy

logical, default FALSE. Should we return a remote dplyr connection to the table in duckdb? This can substantially improve performance and avoid out-of-memory errors when working with very large tables. However, not all R operations can be performed on a remote table, only (most) functions from dplyr and tidyr, as these can be translated automatically to SQL language used by the remote database. Use dplyr functions like dplyr::filter(), dplyr::group_by(), and dplyr::summarise() to subset the data appropriately within the remote table before calling ⁠[dplyr::collect()]⁠ to import the data fully into R.

Details

We cannot filter on start_date or end_date since these come only from the filename metadata and are only added to instrument tables, not observation tables etc.


[Package neonstore version 0.5.1 Index]