plotEffort.numeric: Plot series of fishing effort by ports

Description Usage Arguments Value Author(s) Examples

View source: R/bitacora-internal.R

Description

This method take a series of fishing effort by ports and produces a graph that is useful for the PBP program.

Usage

1
2
3
## S3 method for class 'numeric'
plotEffort(effort1, effort2, labAxis2, labAxis4,
  colBar = NULL, colLine = NULL, legend = NULL, ...)

Arguments

effort1

A vector of the first serie of fishing effort.

effort2

A vector of the second serie of fishing effort.

labAxis2

Text to be included on the left vertical axis of the graph

labAxis4

Text to be included on the right vertical axis of the graph

colBar

The colour of the barplot. Sea barplot.

colLine

The colour of the line on the graph.

legend

The names to include on the legend of the graph.

...

Extra arguments.

Value

A graph for two types of fishing effort by ports. One type is on the left vertical axis and the other on the right vertical axis, the ports are on the horizontal axis.

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
17
18
19
20
21
22
23
24
25
# Read a example of data base
bitacoraData = system.file("extdata", "bitacoraData.csv", package = "imarpe")

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

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

# Effort data
effortData = mainBitacoraData$effortData

# Filter data: anchovy data for anchovy and the north-central region
effortNC = effortSpeciesData.bitacora(data = effortData, species = "anchoveta",
 region = "norte-centro")

# Get effort
effortNC_tt = getEffort(data = effortNC, efforType = "travelTime", effortBy = "port")
effortNC_hn = getEffort(data = effortNC, efforType = "haulTotal", effortBy = "port")

# Graph
plotEffort(effort1 = effortNC_tt, effort2 = effortNC_hn, labAxis2 = "Horas de viaje",
labAxis4 = "N\u{00FA}mero de calas", colBar="gray", colLine = "black",
legend = c("Duracion del viaje", "N\u{00FA}mero de calas"))

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