View source: R/Francis_bomb_functions.R
calc.h | R Documentation |
calc.h
calculates the median horizontal distance between
the linear spline line and the set of points defined by test, where the
horizontal distance is measured in standard errors. Points whose
y-values lie outside the range of the y-values for the line are excluded
from teh calculation (because their horizontal distance from the line is
undefined).
calc.h(line, test, age.err, test.x, test.y)
line |
a list, with components x and y (each an n-vector), containing the series of n points defining the line |
test |
dataframe representing test data set as described in function
|
age.err, test.x, test.y |
character strings representing the names of the
columns in |
Returns a numeric value representing the median horizontal distance from the reference line give the test data set.
Other Bomb Radiocarbon Analyses:
bias.plot.BR()
,
calc.bias()
,
closest.pt()
,
get.h.from.bias()
,
get.nearest()
,
get.ref.line()
,
sim.hdist()
data(snapper) snapper.red <- snapper[snapper$C14year >= 1955 & snapper$C14year <= 1972, ] data(bluenose) bluenose.red <- bluenose[bluenose$C14year >= 1955 & bluenose$C14year <= 1972, ] bluenose.red <- bluenose.red[bluenose.red$C14 >= -506 & bluenose.red$C14 <= 94.0, ] ref <- get.ref.line(snapper.red$C14year, snapper.red$C14) calc.h(line = ref, test = bluenose.red, age.err = "age.err", test.x = "C14year", test.y = "C14")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.