stkde: Map the spatio-temporal intensity of a set of radiocarbon...

Description Usage Arguments Details Value Examples

View source: R/aggregation.R

Description

Function for mapping the spatio-temporal intensity of radiocarbon dates for a given geographical region in one or more tim.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
stkde(
  x,
  coords,
  sbw,
  focalyears,
  tbw,
  win,
  cellres,
  outdir = ".",
  bins = NA,
  backsight = NA,
  maskthresh = 0,
  changexpr = expression((t1 - t0)/tk),
  spjitter = TRUE,
  amount = NULL,
  verbose = TRUE,
  ...
)

Arguments

x

An object of class CalDates with calibrated radiocarbon ages.

coords

A two column matrix of geographical coordinates from a a projected coordinate system (no checks are made for this) and with the same number of rows as length(x).

sbw

A single numeric value for the spatial bandwidth to be applied around each raster cell, expressed as the standard deviation of a continuous Gaussian kernel (passed as the sigma argument to density.ppp()).

focalyears

A vector of numeric values for focal years, in calBP, that will be timesteps at which date intensity maps will be produced.

tbw

A single numeric value for the temporal bandwidth to be applied around each focal year, expressed as the standard deviation of a continuous Gaussian kernel.

win

The bounding polygon for the mapping (must be an object of class 'owin', see the spatstat package)

cellres

The cell or pixel resolution of the output raster maps.

outdir

The output directory for timeslice maps and data that are saved to file.

bins

A vector of labels corresponding to site names, ids, bins or phases (same length as x)

backsight

A single numeric value (which will be coerced to be positive) that specifies a comparison timestep in the past for a mapping of temporal change.

maskthresh

A single numeric value for a lower-bound cut-off for all maps, based on a minimum required spatial intensity of all dates in x.

changexpr

An expression for calculating the change in spatial intensity between the focal year and a backsight year (as defined via the backsight argument). Available input options are t1 (the spatial intensity for the focal year), t0 (the spatial intensity for the backsight year) and tk (the overall spatial intensity for all dates irrespective of year), plus any other standard constants and mathematical operators. A sensible default is provided.

spjitter

Whether noise is applied to the spatial coordinates or not. Default is TRUE.

amount

Amount of jitter applied to the spatial coordinates when spjitter=TRUE. Default is d/5, where d is difference between the closest coordinates.

verbose

A logical variable indicating whether extra information on progress should be reported. Default is TRUE.

...

ignored or passed to internal functions.

Details

This function computes one or more timeslice maps of the spatio-temporal kernel intensity of radiocarbon dates across a geographic region and for a specific focal year. The user specifies the arbitrary sizes of both the spatial and the temporal Gaussian kernels that will be used to summarise radiocarbon date intensity per grid cell per timestep. The results allow standardisation of colour ramps, etc. across timesteps and are amenable to plotting individually via plot.stKde and/or for output to png for animation.

Value

A list object of class stKde with the following elements:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
## Example with a subset of English and Welsh dates from the Euroevol dataset
data(ewdates)
data(ewowin)
x <- calibrate(x=ewdates$C14Age, errors=ewdates$C14SD, normalised=FALSE)
## Create centennial timeslices (also with site binning)
bins1 <- binPrep(sites=ewdates$SiteID, ages=ewdates$C14Age, h=50)
stkde1 <- stkde(x=x, coords=ewdates[,c("Eastings", "Northings")], win=ewowin, 
sbw=40000, cellres=2000, focalyears=seq(6500, 5000, -100), tbw=50, bins=bins1, 
backsight=200, outdir="im",amount=1)
## Plot an example of all four basic outputs for 5900 calBP
dev.new(height=2.5, width=8)
par(mar=c(0.5, 0.5, 2.5, 2))
plot(stkde1, 5900, type="all")

## End(Not run)

rcarbon documentation built on Jan. 13, 2021, 7:09 p.m.