plotAbundance: Plot abundance results to the graphics device or to a file

Description Usage Arguments Value Examples

View source: R/rstox_reports.r

Description

Plots boxplot of bootstrap results together with Coefficient of Variation (CV).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
plotAbundance(projectName, bootstrapMethod = "AcousticTrawl",
  var = "Abundance", unit = NULL, baseunit = NULL, grp1 = "age",
  grp2 = NULL, xlab = NULL, ylab = NULL, main = "", format = "png",
  log = NULL, filetag = NULL, ...)

plotAbundance_AcousticTrawl(projectName, var = "Abundance", unit = NULL,
  baseunit = NULL, grp1 = "age", grp2 = NULL, xlab = NULL,
  ylab = NULL, main = "", format = "png", maxcv = 1, log = NULL,
  filetag = NULL, ...)

plotAbundance_SweptAreaTotal(projectName, unit = NULL, baseunit = NULL,
  xlab = NULL, ylab = NULL, main = "", format = "png", log = NULL,
  filetag = NULL, ...)

factorNAfirst(x)

Arguments

projectName

The name or full path of the project, a baseline object (as returned from getBaseline or runBaseline, og a project object (as returned from openProject).

bootstrapMethod

The bootstrap method used to generate the data.

var

A key string indicating the variable to plot (see getPlottingUnit()$defaults$Rstox_var for available values). For plotAbundance_SweptAreaTotal() var is hard coded to "Count"

unit

A unit key string indicating the unit, or alternatively a numeric value giving the scaling factor (run getPlottingUnit() to see available values).

baseunit

The unit used in the data.

grp1

Variable used to group results, e.g. "age", "LenGrp", "sex"

grp2

An optional second grouping variable

xlab

The label to user for the x axis, with default depending on data plotted,

ylab

The label to user for the y axis, with default depending on data plotted.

main

Main title for plot (text)

format

The file format of the saved plot, given as a string naming the function to use for saving the plot (such as bmp, jpeg, png, tiff), with filename as its first argument. Arguments fo the functions are given as .... Dimensions are defaulted to width=5000, height=3000, , resolution to 500 dpi. If format has length 0, the plot is shown in the graphics window, and not saved to file.

log

Character string giving the axes to apply log10() to, or TRUE to indicate log="y".

filetag

A character string to append to the file name (before file extension).

...

Parameters passed on from other functions. Includes numberscale, which is kept for compability with older versions. Please use 'unit' instead. (Scale results with e.g. 1000 or 1000000).

maxcv

The maximum cv in the plot. Use Inf to indicate the maximum cv of the data.

Value

Plot saved to file and abundance table printed

Examples

1
2
3
projectName <- "Test_Rstox"
plotAbundance(projectName, grp1="age")
plotAbundance(projectName, grp1="age", unit=1)

Sea2Data/Rstox documentation built on April 18, 2018, 11:11 p.m.