get_species | R Documentation |
Extract a list of speices names, code, market category, etc from the SVDBS SVSPECIES_LIST table
get_species(channel, species = "all")
channel |
an Object inherited from DBIConnection-class. This object is used to connect
to communicate with the database engine. (see |
species |
Numeric or character vector. a specific species code or set of codes. Defaults to "all" species. Numeric codes are converted to VARCHAR2(3 BYTE) when creating the sql statement. Character codes are short character strings. |
A list is returned:
species |
containing the result of the executed |
sql |
containing the sql call |
colNames |
a vector of the table's column names |
The default sql statement "select * from svdbs.svspecies_list
" is used
Use the data dictionary for field name explanations
Note: species codes (svspp) are stored in the database as VARCHAR2(3 BYTE)
connect_to_database
Other helper:
get_conversion_factors()
,
get_cruise_purpose()
,
get_maturity()
,
get_sex_fscs()
,
get_sex()
,
get_strata()
,
get_vessel()
## Not run:
# extracts complete species table based on custom sql statement
channel <- dbutils::connect_to_database(server="serverName",uid="userName")
get_species(channel)
# extracts info for cod (73)
get_species(channel,species=73)
get_species(channel,"cod")
get_species(channel,"co")
get_species(channel,"COD")
# extracts info for cod (73) and bluefish (135)
get_species(channel,species= c("73","135"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.