Learn R Programming

rice (version 0.3.0)

find.shells: Find nearby shell-derived dR values

Description

Find the shells closest to a chosen coordinate, and plot the dR values and feeding ecology. Uses the marine database downloaded (30 Aug 2024) from calib.org/marine. See Reimer PJ, Reimer RW, 2001. A marine reservoir correction database and on-line interface. Radiocarbon 43:461-3.

Usage

find.shells(
  longitude,
  latitude,
  nearest = 50,
  colour = "dR",
  rainbow = FALSE,
  size = 2,
  scale = c(),
  mincol = "yellow",
  maxcol = "red",
  symbol = "feeding",
  symbol.legend = TRUE,
  ocean.col = "aliceblue",
  land.col = rgb(0, 0.5, 0, 0.6)
)

Value

A dataset with the n nearest dR values, and a plot of their coordinates.

Arguments

longitude

Longitude of the point. Can only deal with one point at a time.

latitude

Latitude of the point. Can only deal with one point at a time.

nearest

The number of shell values to be returned. Defaults to 50.

colour

The variable to be plotted as colour. Expects a continuous variable. Defaults to 'dR'.

rainbow

Whether or not to use a rainbow scale to plot the variable.

size

Size of the symbols. Defaults to 2.

scale

Resolution of the map. Can be "small", "medium" or "large". If the latter, a high-resolution dataset will have to be downloaded using the R package 'rnaturalearthhires'. Since this package is not on CRAN, you will have to download it yourself. Defaults to 'medium' if 'rnaturalearthhires' is not installed, and to 'high' if it is installed.

mincol

Colour for minimum values.

maxcol

Colour for maximum values.

symbol

The variable to be plotted as symbol. Expects a categoric variable. Defaults to 'feeding'.

symbol.legend

Whether or not to plot the legend for the symbols.

ocean.col

Colour for the oceans. Defaults to ocean.col="aliceblue".

land.col

Colour for the land. Defaults to semi-transparent darkgreen: land.col=rgb(0, 0.5, 0, 0.6).

Examples

Run this code
  N_UK <- map.shells(53, -11, 60, 2, scale="medium")
  mean(N_UK$dR)

Run the code above in your browser using DataLab