get_vessels | R Documentation |
Extract a list of vessell ID's, tonnage, crew size, home port, etc from the NEFSC "Mstrvess" supporting table
get_vessels(
channel,
sqlStatement = "select * from cfdbs.mstrvess",
where = NULL
)
channel |
DBI Object. Inherited from DBIConnection-class. This object is used to connect
to communicate with the database engine. (see |
sqlStatement |
an sql statement (optional) |
where |
text string appending where clause to sql |
A list is returned:
vessels |
containing the result of the executed |
sql |
containing the |
colNames |
a vector of the table's column names |
If no sqlStatement
is provided the default sql statement "select * from cfdbs.mstrvess
" is used
Use the data dictionary (http://nova.nefsc.noaa.gov/datadict/) for field name explanations
connect_to_database
Other get functions:
get_age_length()
,
get_anything_sql()
,
get_areas()
,
get_gears()
,
get_landings_length()
,
get_landings_palmer()
,
get_landings()
,
get_locations()
,
get_ports()
,
get_species_itis()
,
get_species()
## Not run:
# extracts complete vessel table based on custom sql statement
channel <- connect_to_database(server="name_of_server",uid="individuals_username")
get_vessels(channel)
# extracts vessel ID, crew size, and home port on custom sql statement
channel <- connect_to_database(server="name_of_server",uid="individuals_username")
sqlStatement <- "select vessel, crew, homeport from cfdbs.mstrvess;"
get_vessels(channel,sqlStatement)
# extracts all vessel info for vessels lengths < 50ft based on custom sql statement
channel <- connect_to_database(server="name_of_server",uid="individuals_username")
sqlStatement <- "select * from cfdbs.mstrvess where vesslen <29;"
get_vessels(channel,sqlStatement)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.