get_datras_data: Function to upload DATRAS survey data into R

Description Usage Arguments Details Examples

View source: R/get_datras_data.R

Description

This function uploads DATRAS data from one quarter and one year at a time, for a given survey. Several other tools are available to the R user to perform this task, including the DATRAS R package. A more sophisticated approach has been developed recently by Scott Large and is available in R package rICES at https://github.com/ices-tools-dev/rICES.

Usage

1
get_datras_data(whatinfo, survey, year, quarter)

Arguments

whatinfo

is a character variable "HH", "HL" or "CA". "HH" is haul information, "HL" is haul contents by size, and "CA" is haul contents by age

survey

is a character variable matching the survey code wanted

year

is a character variable for the year wanted

quarter

is a character variable for the quarter wanted

Details

get_datras_data achieves the same result as rICES, but leaves the task of aggregating surveys (if multiple surveys are uploaded) to the user. rICES makes the most of multi-core computers and will likely be faster in downloading data for many quarters and years, but may be a little more complex to use for an R beginner.

Examples

1
2
3
4
5
data(datras_surveys)
mysurvey <- datras_surveys$survey[1]
myear <- datras_surveys$year[1]
myquarter <- datras_surveys$quarter[1]
get_datras_data("HH", mysurvey, myear, myquarter)

remsamp/Rmerp_public documentation built on May 3, 2019, 4:07 p.m.