read.trawl: Read Trawl

Description Usage Arguments Details Examples

View source: R/read.trawl.R

Description

Read in the raw trawl data sets for each region

Usage

1
2
3
read.trawl(reg = c("ai", "ebs", "gmex", "goa", "neus", "newf", "ngulf", "sa",
  "sgulf", "shelf", "wcann", "wctri"), zippath = file.path(system.file(package
  = "trawlData"), "extdata"), ...)

Arguments

reg

the region name; should be one of the following: c("ai","ebs","gmex","goa", "neus", "newf", "sa", "sgulf", "shelf", "wcann", "wctri")

zippath

path to the zip file (or, for neus, to the folder containing a folder named 'neus')

...

nothing

Details

These functions read in raw data sets that, with the exception of neus, are in .zip files. An easy way to use these functions on the raw files included with the package is to do setwd(system.file(package="trawlData")), then run the script as-is. However, you are equally able to run the function as you would any other read function (like read.csv, e.g.). Just remember that the function operates on a folder or zip file, not on a single data file. There is some use of regular expression to find appropriate file names. However, it is best to be sure that the files are named correctly (data files that come with this package are correctly named).

Examples

1
2
3
4
## Not run: 
ai.data <- read.trawl(reg="ai", zippath=file.path(system.file(package="trawlData"),"inst/extdata"))

## End(Not run)

rBatt/trawlData documentation built on May 26, 2019, 7:45 p.m.