get_absence_presence: Extract absence-presence data from obdbs

Description Usage Arguments Value Reference See Also Examples

View source: R/get_presence_absence.R

Description

For a specified region of interest, extracts all hauls and indicates presence or absence for species of interest. Sampled by observers on commercial fishing boats This data is extracted from obspp

Usage

1
2
get_absence_presence(channel, species = "all", year = 1994,
  sex = "all", area = "all")

Arguments

channel

RODBC object (see connect_to_database)

species

Numeric Vector. a specific species code (NESPP3) 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.

year

Numeric vector. Years to search over

sex

Character string. Default = "all". options "M" (male), "F" (female), "U" (unsexed)

area

Character vector. Statistical areas. Default = "all".

Value

A list is returned:

data

containing the result of the executed $sql statement

sql

containing the sql call

colNames

a vector of the table's column names

Reference

Use the data dictionary (http://nova.nefsc.noaa.gov/datadict/) for field name explanations. Note: species codes (nespp4) are stored in the database as VARCHAR2(4 BYTE)

See Also

connect_to_database

Examples

1
2
3
4
5
6
7
## Not run: 
# extracts info for american flounder (plaice) (124) in stat areas 512 to 514 for years 2000 - 2017
channel <- connect_to_database(server="name_of_server",uid="individuals_username")
get_absence_presence(channel,species=124, area = c(512:514), year=c(2000:2017))


## End(Not run)

andybeet/obdbs documentation built on Feb. 5, 2021, 9:24 p.m.