extractMRFSS {fishmethods}R Documentation

Extraction of Marine Recreational Fisheries Statistics Survey Data from SAS Transport Files

Description

MRFSS intercept and catch/effort data in SAS transport files (.xpt) are extracted using package foreign and are saved as .csv files under data and year-specific subdirectories.

Usage

extractMRFSS(indir = NULL, outdir = NULL, type = NULL,
 state = NULL, styr = NULL, endyr = NULL)

Arguments

indir the path and directory (in quotes) under which the SAS transport files are stored.
outdir the path and main directory (in quotes) under which data- and year-specific subdirectories will be created and .csv files will be stored.
type the type of data to extract. 1 = raw intercept data, 2= catch/effort estimates.
state the state code(s) designating which state(s) data to extract. If multiple states, separate state codes with commas within the concatentation function. If data from all states are desired, do not include the state= argument. State codes are found on the MRFSS website.
styr the starting year of data to extract.
endyr the ending year of data to extract.

Details

Download the zipped intercept data and catch/effort estimates from the MRFSS website http://www.st.nmfs.noaa.gov/st1/recreational/index.html. Unzip/extract the SAS transport files (.xpt) to the indir directory. Using this function, specify the indir and outdir directories, which data type to extract, the state code(s), and the starting and ending years (from .xpt files) of data to be extracted. If the outdir directory is not specified, the files will be stored under the indir directory.

Value

Raw intercept data and catch & effort estimates saved as .csv files.

Author(s)

Gary A. Nelson, Massachusetts Division of Marine Fisheries gary.nelson@state.ma.us

References

http://www.st.nmfs.noaa.gov/st1/recreational/index.html.

Examples

## This is a typical specification, not a working example
## Not run: 
extractMRFSS(indir="C:/Temp",outdir="C:/MRFSS",type=1,state=25,
styr=1981,endyr=2007)
## End(Not run)

[Package fishmethods version 0.0-1 Index]