PullCatch.fn | R Documentation |
Pull catch data from the
NWFSC data warehouse
for a single species or all observed species, where the latter is specified
by leaving both Name = NULL
and SciName = NULL
.
PullCatch.fn(
Name = NULL,
SciName = NULL,
YearRange = c(1980, 5000),
SurveyName = NULL,
SaveFile = lifecycle::deprecated(),
Dir = NULL,
verbose = TRUE
)
Name |
A character entry with the desired common name of the
species you want to pull data for from the data warehouse.
Use a vector of names if you want information for more than one species or
if the desired species is included in the database using more than one name,
e.g., vermilion rockfish (see the example below).
Use the |
SciName |
A character entry with the desired scientific name of the
species you want to pull data for from the data warehouse.
Use a vector of names if you want information for more than one species or
if the desired species is included in the database using more than one name,
e.g., vermilion rockfish (see the example below).
Use the |
YearRange |
An integer vector of length two with the range of years to pull data for. |
SurveyName |
A character entry from one of the following options that specifies which survey to pull the data for:
Currently, you must pull data one survey at a time, though we are working on
allowing for a vector of survey names and
|
SaveFile |
Deprecated with nwfscSurvey 2.3. Output will be save automatically if the Dir input is specified. |
Dir |
The directory where you want the output file to be saved.
The name of the file within |
verbose |
A logical that specifies if you want to print messages and
warnings to the console. The default is |
The data available in the warehouse are cleaned pior to being downloaded with the intent that they provide the best available information for use in an index-standardization procedure. The removed samples may be of use to others with a less-restrictive goal than producing an index of abundance. For example, life-stage samples are excluded because they are not collected using the same protocols as standard samples. To download all data, we currently recommend going to the NWFSC data warehouse and using the csv link to extract data for a single species at a time. In the future, we hope to add functionality to this package such that downloading all data can be done easily within this function. See Issue #43 for more information.
Chantel Wetzel (maintainer) based on code by John Wallace
## Not run:
# SurveyName is only arg that has to be specified
dat <- PullCatch.fn(SurveyName = "NWFSC.Combo")
# Example with specified common name
catch_dat <- PullCatch.fn(
Name = "vermilion rockfish",
SurveyName = "NWFSC.Combo"
)
# Example with specified scientific name
catch_dat <- PullCatch.fn(
SciName = "Eopsetta jordani",
SurveyName = "NWFSC.Combo"
)
# Example with multiple names
catch_dat <- PullBio.fn(Name = c(
"vermilion rockfish",
"vermilion and sunset rockfish"
), SurveyName = "NWFSC.Combo")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.