find.shells | R Documentation |
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.
find.shells(
longitude,
latitude,
nearest = 50,
browse = FALSE,
colour = "dR",
rainbow = FALSE,
size = 2,
mapsize = "large",
mincol = "yellow",
maxcol = "red",
symbol = "feeding",
symbol.legend = TRUE,
legend.loc = c(0.95, 0.02),
legend.size = c(0.05, 0.2),
ocean.col = "aliceblue",
land.col = rgb(0, 0.5, 0, 0.6),
padding = 1,
warn = TRUE,
currents = TRUE
)
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. |
browse |
Type of map to provide. |
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. |
mapsize |
Resolution of the map. Can be "small" or "large". If the latter, a high-resolution dataset will have to be downloaded using the R package 'rnaturalearthhires'. Since this package is on github but not on CRAN, you will have to download it yourself (using the command devtools::install_github("ropensci/rnaturalearthhires")). Defaults to "small" if 'rnaturalearthhires' is not installed, and to "large" 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. |
legend.loc |
Location of the legend, if using a basic plot. Defaults to the bottom right corner based on par("usr"), |
legend.size |
Size of the legend, if using a basic plot. Defaults to |
ocean.col |
Colour for the oceans. Defaults to |
land.col |
Colour for the land. Defaults to semi-transparent darkgreen: |
padding |
Area around the map if using a basic plot. Avoids strange line features. Defaults to |
warn |
Whether or not to warn if some recommended R packages are not available. |
currents |
If set to TRUE (the default), the user will be asked if they want to browse a map of ocean currents. If the user responds 'y', an Internet browser window will be opened pointing to a zoomed-in map of ocean currents (at 50 m depth). The ocean currents are from 'earth.nullschool.net' and are based on an ocean circulation model which is updated daily. Owing to limitations of the website, the shell locations cannot currently be added to the page itself. |
This function uses the 'rnaturalearth' package for country maps. If the high-resolution maps are desired, the 'rnaturalearthhires' package must be installed from GitHub.
A dataset with the n nearest dR values, and a plot of their coordinates.
UK <- find.shells(0, 55, mapsize="small")
mean(UK$dR)
Caribbean <- find.shells(-70, 20, 30, mapsize="small")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.