plot.cpue: Plot method for cpue objects

Description Usage Arguments Value Examples

View source: R/cpue-class.R

Description

This method takes a cpue object and make useful plots. The plots can be daily, monthly, yearly, over the peruvian region, and for north-central and south peruvian region.

Usage

1
2
3
4
## S3 method for class 'cpue'
plot(x, language = "spanish", ploType = NULL,
  daysToPlot = c(1, 8, 15, 22), textAxis2 = NULL, textAxis4 = NULL,
  colBar = "gray", ...)

Arguments

x

Object of cpue class.

language

A character. Define the language of text labels in plots. It could be "spanish" or "english".

ploType

What type of plot should be draw. Possible types are:

  • plotDaily for daily plot

  • plotMonthly for monthly plot

  • plotYearly for yearly plot

  • plotPeru for all the peruvian region

  • plotNC to graph the north-central region

  • plotS to graph the south region

daysToPlot

If is a daily plot by default the x-axis show the first day of a week (1, 8, 15, 22) but could be change to show a specific day or to show the all days of the data with all. This is including in a vector form.

textAxis2

The text of the x axis.

textAxis4

The text of the y axis.

...

Extra arguments.

Value

A graph of the specified type in ploType.

Examples

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

# Produce a object of cpue class
cpue  = getFishingData(file = fisheryData, type = "cpue", varType = "cpue", sp = "caballa", efforType = "capacidad_bodega")
class(cpue)

plot(cpue)
plot(cpue, daysToPlot = "1", colBar = "red")
plot(cpue, language= "english")
plot(cpue, ploType = "plotMonthly")
plot(cpue, ploType = "plotMonthly", language= "english", colBar = "green")
plot(cpue, ploType = "plotYearly")
plot(cpue, ploType = "plotYearly", colBar = "orange")
plot(cpue, ploType = "plotPERU")
plot(cpue, ploType = "plotNC")
plot(cpue, ploType = "plotS")

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