# NOT RUN {
CalArray <- makeCalArray(intcal20, calrange = c(9000,11000), inc = 5 )
# minimum data requirement includes 'mean' and 'sd' and either 'site' or 'phase'
data <- data.frame(age = c(8350,8500,8900,9200),
sd = c(50,50,50,50),
site = c('field','field','field','garden'))
x <- phaseCalibrator(data, CalArray)
# notice three phases were automatically generated, each with a total SPD area = 1
colSums(x)*5
# in contrast, three dates are specified as coming from the same phase,
# and the 'garden.1' phase is partly outside the date range
data <- data.frame(age = c(8350,8500,8900,9480),
sd = c(50,50,50,50),
phase = c('field.1','field.1','field.1','garden.1'))
x <- phaseCalibrator(data, CalArray)
colSums(x)*5
# }
Run the code above in your browser using DataLab