gaussW | R Documentation |
Rescale a numeric vector to a specified minimum and maximum.
gaussW(x, mean, sd, type = "weights")
x |
A numeric vector or an object of class CalDates. |
mean |
A single numeric value indicating the value to centre the Gaussian kernel on. |
sd |
A single numeric value indicating the standard deviation of the Gaussian kernel to be used. |
type |
The type of output to produce: currently either "weighted" (for a simple total weight value for each date) or "raw" (a list of reweighted calibrated radiocarbon probabilities for each calibrated date). |
A numeric vector of weights (or optionally a list of reweighted calibrated radiocarbon probabilities).
## Example weighting fo a set of dates versus a focal date of 5950 calBP
years <- seq(6500, 5500, -10)
plot(cbind(years, gaussW(years, 5950, 50)))
## Example weighting of three calibrated dates versus a focal date of 5950 calBP
dates <- calibrate(c(5280, 5180, 5080), c(30,30,30), normalised=FALSE)
gaussW(dates, 5950, 50)
## Or the same with raw output
dateswt <- gaussW(dates, 5950, 50, type="raw")
head(dateswt[[1]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.