Extract a list of dealer names and locations from supporting tables
Arguments
- channel
an Object inherited from
ROracle::Oracle. This object is used to connect to communicate with the database engine. (seedbutils::connect_to_database)- state
Character vector. State abbreviations. Default = NA (All states)
- year
Numeric vector. Years in which to pull data. Defaul = NA (All years)
Value
A list is returned:
- data
containing the result of the executed
sqlStatement- sql
containing the sql call
- colNames
a vector of the table's column names
If no sqlStatement is provided the default sql statement "select * from NEFSC_GARFO.PERMIT_DEALER" is used
See also
connect_to_database
Other get functions:
get_areas(),
get_gears(),
get_locations(),
get_ports(),
get_species(),
get_species_itis(),
get_species_stock_area(),
get_vessels()
Examples
if (FALSE) { # \dontrun{
# extracts dealer location table
channel <- connect_to_database(server="name_of_server",uid="individuals_username")
get_dealers(channel)
# extracts dealer details for states, Massachusetts and Maine
get_dealers(channel,state = c("MA","ME"))
# extracts dealer details for years 2010 to 2020
get_dealers(channel, year = 2010:2020)
# extracts dealer details for years 2010 to 2020 for MA & ME
get_dealers(channel, state = c("MA","ME"), year = 2010:2020)
} # }
