Extract a list of speices names, code, market category, etc from the SVDBS SVSPECIES_LIST table
get_species(channel, species = "all")
an Object inherited from DBIConnection-class. This object is used to connect
to communicate with the database engine. (see connect_to_database
)
Numeric or character vector. A specific species code or set of codes. Default = "all". Numeric codes are converted to VARCHAR2(3 BYTE) when creating the sql statement. Character codes are short character strings.
A list is returned:
containing the result of the executed $sql
statement
containing the sql call
a vector of the table's column names
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_length_weight()
,
get_maturity()
,
get_sex()
,
get_sex_fscs()
,
get_strata()
,
get_vessel()
if (FALSE) { # \dontrun{
# 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"))
} # }