if (FALSE) {
## Example with a subset of English and Welsh dates from the Euroevol dataset
data(ewdates)
data(ewowin)
dir.create(file.path("im"), showWarnings=FALSE)
x <- calibrate(x=ewdates$C14Age, errors=ewdates$C14SD, normalised=FALSE)
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")
## Plot just the proportion surface for just 5900 calBP
plot(stkde1, 5900, type="proportion")
## Plot an example of all four basic outputs for just 5900 calBP
dev.new(height=2.5, width=8)
par(mar=c(0.5, 0.5, 2.5, 2))
plot(stkde1, 5900, type="all")
## Plot standardised change surfaces to a sub-directory called
## /png for all timeslices and save to file.
dir.create(file.path("png"), showWarnings=FALSE)
plot(stkde1, seq(6500,5000,-100), type="change", ramptype="std", withpts=TRUE, plotdir="png")
## Plot all four summary surfaces in one image, saving them to a sub-directory call 'pngall',
## and with the output of the change map standardised to a common ramp
## (but leaving the focal and proportion maps unstandardised with simple ramp labelling)
dir.create(file.path("pngall"), showWarnings=FALSE)
plot(stkde1, seq(6500,5000,-100), type="all", ramptype=c("unl","unl","std"), imdim=cm(c(2.5,8)),
withpts=TRUE, plotdir="pngall")
}
Run the code above in your browser using DataLab