shells.mean: Plot and summarize the dR values

View source: R/marine.R

shells.meanR Documentation

Plot and summarize the dR values

Description

After selecting a relevant range of shell values, plot them and calculate the weighted mean and variance.

Usage

shells.mean(
  dat,
  feeding = c(),
  draw = TRUE,
  distance = FALSE,
  pch = 20,
  col.mn = 1,
  lty.mn = 2,
  col.sd = rgb(0, 0, 0, 0.1)
)

Arguments

dat

The data, as returned from the function 'plot.shells'.

feeding

Whether or not to select a specific feeding behaviour. Defaults to empty (no selection of feeding behaviour).

draw

Whether or not to draw the values.

distance

Plot the dR values according to their distance (if you've used find.shells; assumes that 'dat' has a final column with the distances).

pch

Symbol to be plotted. Defaults to a closed circle (pch=20).

col.mn

Colour for the weighted mean. Defaults to black, col.mn=1.

lty.mn

Line type for the weighted mean. Defaults to dashed, lty.mn=2.

col.sd

Colour of the rectangle of the error. Defaults to transparent grey, col.sd=rgb(0,0,0,.1).

Value

A plot of the dR values, as well as the weighted mean (vertical line) and (weighted) error (rectangle).

Examples

 N_UK <- map.shells(53, -11, 60, 2, mapsize="small")
 shells.mean(N_UK)
 nearby <- find.shells(0,56,20) # somewhere in Scotland
 shells.mean(nearby, distance=TRUE) # distance matters

rice documentation built on April 11, 2025, 5:53 p.m.