effortSpeciesData.bitacora: Get species effort data

Description Usage Arguments Value Author(s) Examples

View source: R/bitacora-internal.R

Description

Receive an object of bitacora class, indexes the data by species, estimates the season by species, for anchovy the season depend of region (north-central and south region) but for other species (sardine, jack mackerel, chub mackerel and bonito) the season is annual.

Usage

1

Arguments

data

A data.frame obtained from effortData.bitacora function (internal function of bitacora class). This data frame could be obtained from getMainResults.bitacora function too.

species

A character with the common name of anchovy ("anchoveta"), sardine ("sardina"), jack mackerel ("jurel"), chub mackerel ("caballa") and bonito ("bonito").

region

If the species is anchovy (anchoveta) is necessary indicate for each region the effort data is going to be calculate. By default is NULL.

Value

A data.frame with effort data for a given species.

Author(s)

Criscely Lujan-Paredes, criscelylujan@gmail.com.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Read a example of data base
bitacoraData = system.file("extdata", "bitacoraData.csv", package = "imarpe")

# Create a object of bitacora class
bitacoraObject = getBitacoraData(file = bitacoraData)
class(bitacoraObject)

# Get the results
mainBitacoraData = getMainResults.bitacora(object = bitacoraObject, language = "spanish",
specie = "anchoveta", effortData = TRUE)

# Effort data
effortData = mainBitacoraData$effortData

# Use of effortSpeciesData.bitacora
effortNC = effortSpeciesData.bitacora(data = effortData, species = "anchoveta", region = "norte-centro")

imarpe/imarpe documentation built on Aug. 8, 2020, 8:40 p.m.