R/choosePositions.BchronologyRun.R
choosePositions.Rd
This function finds, for a given current chronology, created via
Bchronology
, which positions (depths) to date next
If N = 1 it just finds the position with the biggest uncertainty
If N>1 it puts a date at the N = 1 position and re-runs
Bchronology
with the extra psuedo date. It uses the
unCalibrate
function with the un-calibrated age estimated
at the median of the chronology and the sd as specified via the
newSds
argument. Other arguments specify the new thicknesses,
calibration curves, and outlier probabilities for newly inserted psuedo-dates.
choosePositions(
bchrRun,
N = 1,
newSds = 30,
newThicknesses = 0,
positions = bchrRun$predictPositions,
newCalCurve = "intcal20",
newOutlierProb = 0.05,
level = 0.5,
plot = TRUE,
count = 1,
linesAt = NULL
)
A run of the current chronology as output from Bchronology
The number of new positions required
The new standard deviations of the psuedo-added dates
The new thicknesses of the psuedo-added dates
The positions allowed to estimate the new positions to date. Defaults to the value of predictPositions
from the
Bchronology
run
The new calibration curve of the psuedo-added dates
The new outlier probabilities of the psuedo-added dates
The confidence level required for minimising the uncertainty. Defaults to 50%. (Note: this will be estimated more robustly than the 95% level)
Whether to plot the chronologies as they are produced
Counter function (not for use other than by the function itself)
Horizontal line positions (not for use other than by the function itself)
Some plots and the positions to date next
Bchronology
for the main function to create chronologies, unCalibrate
for the ability to invert calendar dates for a given calibration curve.
# \donttest{
data(Glendalough)
GlenOut <- Bchronology(
ages = Glendalough$ages,
ageSds = Glendalough$ageSds,
calCurves = Glendalough$calCurves,
positions = Glendalough$position,
positionThicknesses = Glendalough$thickness,
ids = Glendalough$id,
predictPositions = seq(0, 1500, by = 10)
)
#> Running Bchronology...
#>
|
| | 0%
|
| | 1%
|
|= | 1%
|
|= | 2%
|
|== | 3%
|
|== | 4%
|
|=== | 4%
|
|=== | 5%
|
|=== | 6%
|
|==== | 6%
|
|==== | 7%
|
|===== | 8%
|
|===== | 9%
|
|====== | 9%
|
|====== | 10%
|
|====== | 11%
|
|======= | 11%
|
|======= | 12%
|
|======== | 13%
|
|======== | 14%
|
|========= | 14%
|
|========= | 15%
|
|========= | 16%
|
|========== | 16%
|
|========== | 17%
|
|=========== | 18%
|
|=========== | 19%
|
|============ | 19%
|
|============ | 20%
|
|============ | 21%
|
|============= | 21%
|
|============= | 22%
|
|============== | 23%
|
|============== | 24%
|
|=============== | 24%
|
|=============== | 25%
|
|=============== | 26%
|
|================ | 26%
|
|================ | 27%
|
|================= | 28%
|
|================= | 29%
|
|================== | 29%
|
|================== | 30%
|
|================== | 31%
|
|=================== | 31%
|
|=================== | 32%
|
|==================== | 33%
|
|==================== | 34%
|
|===================== | 34%
|
|===================== | 35%
|
|===================== | 36%
|
|====================== | 36%
|
|====================== | 37%
|
|======================= | 38%
|
|======================= | 39%
|
|======================== | 39%
|
|======================== | 40%
|
|======================== | 41%
|
|========================= | 41%
|
|========================= | 42%
|
|========================== | 43%
|
|========================== | 44%
|
|=========================== | 44%
|
|=========================== | 45%
|
|=========================== | 46%
|
|============================ | 46%
|
|============================ | 47%
|
|============================= | 48%
|
|============================= | 49%
|
|============================== | 49%
|
|============================== | 50%
|
|============================== | 51%
|
|=============================== | 51%
|
|=============================== | 52%
|
|================================ | 53%
|
|================================ | 54%
|
|================================= | 54%
|
|================================= | 55%
|
|================================= | 56%
|
|================================== | 56%
|
|================================== | 57%
|
|=================================== | 58%
|
|=================================== | 59%
|
|==================================== | 59%
|
|==================================== | 60%
|
|==================================== | 61%
|
|===================================== | 61%
|
|===================================== | 62%
|
|====================================== | 63%
|
|====================================== | 64%
|
|======================================= | 64%
|
|======================================= | 65%
|
|======================================= | 66%
|
|======================================== | 66%
|
|======================================== | 67%
|
|========================================= | 68%
|
|========================================= | 69%
|
|========================================== | 69%
|
|========================================== | 70%
|
|========================================== | 71%
|
|=========================================== | 71%
|
|=========================================== | 72%
|
|============================================ | 73%
|
|============================================ | 74%
|
|============================================= | 74%
|
|============================================= | 75%
|
|============================================= | 76%
|
|============================================== | 76%
|
|============================================== | 77%
|
|=============================================== | 78%
|
|=============================================== | 79%
|
|================================================ | 79%
|
|================================================ | 80%
|
|================================================ | 81%
|
|================================================= | 81%
|
|================================================= | 82%
|
|================================================== | 83%
|
|================================================== | 84%
|
|=================================================== | 84%
|
|=================================================== | 85%
|
|=================================================== | 86%
|
|==================================================== | 86%
|
|==================================================== | 87%
|
|===================================================== | 88%
|
|===================================================== | 89%
|
|====================================================== | 89%
|
|====================================================== | 90%
|
|====================================================== | 91%
|
|======================================================= | 91%
|
|======================================================= | 92%
|
|======================================================== | 93%
|
|======================================================== | 94%
|
|========================================================= | 94%
|
|========================================================= | 95%
|
|========================================================= | 96%
|
|========================================================== | 96%
|
|========================================================== | 97%
|
|=========================================================== | 98%
|
|=========================================================== | 99%
|
|============================================================| 99%
|
|============================================================| 100%
#> Run completed!
# Find out which two positions (depths) to date if we have room for two more dates
# Here going to choose 3 new positions to date
newPositions <- choosePositions(GlenOut, N = 3)
#>
#> Round 1
#> Position with largest uncertainty at 50% level is 830
#>
|
|================================================================| 100%
#> Calibrating with new age 5898 with sd 30 at position 830
#> Running Bchronology...
#>
|
| | 0%
|
| | 1%
|
|= | 1%
|
|= | 2%
|
|== | 3%
|
|== | 4%
|
|=== | 4%
|
|=== | 5%
|
|=== | 6%
|
|==== | 6%
|
|==== | 7%
|
|===== | 8%
|
|===== | 9%
|
|====== | 9%
|
|====== | 10%
|
|====== | 11%
|
|======= | 11%
|
|======= | 12%
|
|======== | 13%
|
|======== | 14%
|
|========= | 14%
|
|========= | 15%
|
|========= | 16%
|
|========== | 16%
|
|========== | 17%
|
|=========== | 18%
|
|=========== | 19%
|
|============ | 19%
|
|============ | 20%
|
|============ | 21%
|
|============= | 21%
|
|============= | 22%
|
|============== | 23%
|
|============== | 24%
|
|=============== | 24%
|
|=============== | 25%
|
|=============== | 26%
|
|================ | 26%
|
|================ | 27%
|
|================= | 28%
|
|================= | 29%
|
|================== | 29%
|
|================== | 30%
|
|================== | 31%
|
|=================== | 31%
|
|=================== | 32%
|
|==================== | 33%
|
|==================== | 34%
|
|===================== | 34%
|
|===================== | 35%
|
|===================== | 36%
|
|====================== | 36%
|
|====================== | 37%
|
|======================= | 38%
|
|======================= | 39%
|
|======================== | 39%
|
|======================== | 40%
|
|======================== | 41%
|
|========================= | 41%
|
|========================= | 42%
|
|========================== | 43%
|
|========================== | 44%
|
|=========================== | 44%
|
|=========================== | 45%
|
|=========================== | 46%
|
|============================ | 46%
|
|============================ | 47%
|
|============================= | 48%
|
|============================= | 49%
|
|============================== | 49%
|
|============================== | 50%
|
|============================== | 51%
|
|=============================== | 51%
|
|=============================== | 52%
|
|================================ | 53%
|
|================================ | 54%
|
|================================= | 54%
|
|================================= | 55%
|
|================================= | 56%
|
|================================== | 56%
|
|================================== | 57%
|
|=================================== | 58%
|
|=================================== | 59%
|
|==================================== | 59%
|
|==================================== | 60%
|
|==================================== | 61%
|
|===================================== | 61%
|
|===================================== | 62%
|
|====================================== | 63%
|
|====================================== | 64%
|
|======================================= | 64%
|
|======================================= | 65%
|
|======================================= | 66%
|
|======================================== | 66%
|
|======================================== | 67%
|
|========================================= | 68%
|
|========================================= | 69%
|
|========================================== | 69%
|
|========================================== | 70%
|
|========================================== | 71%
|
|=========================================== | 71%
|
|=========================================== | 72%
|
|============================================ | 73%
|
|============================================ | 74%
|
|============================================= | 74%
|
|============================================= | 75%
|
|============================================= | 76%
|
|============================================== | 76%
|
|============================================== | 77%
|
|=============================================== | 78%
|
|=============================================== | 79%
|
|================================================ | 79%
|
|================================================ | 80%
|
|================================================ | 81%
|
|================================================= | 81%
|
|================================================= | 82%
|
|================================================== | 83%
|
|================================================== | 84%
|
|=================================================== | 84%
|
|=================================================== | 85%
|
|=================================================== | 86%
|
|==================================================== | 86%
|
|==================================================== | 87%
|
|===================================================== | 88%
|
|===================================================== | 89%
|
|====================================================== | 89%
|
|====================================================== | 90%
|
|====================================================== | 91%
|
|======================================================= | 91%
|
|======================================================= | 92%
|
|======================================================== | 93%
|
|======================================================== | 94%
|
|========================================================= | 94%
|
|========================================================= | 95%
|
|========================================================= | 96%
|
|========================================================== | 96%
|
|========================================================== | 97%
|
|=========================================================== | 98%
|
|=========================================================== | 99%
|
|============================================================| 99%
|
|============================================================| 100%
#> Run completed!
#>
#>
#> Round 2
#> Next position with largest uncertainty at 50% level is 630
#>
|
|================================================================| 100%
#> Calibrating with new age 4081 with sd 30 at position 630
#> Running Bchronology...
#>
|
| | 0%
|
| | 1%
|
|= | 1%
|
|= | 2%
|
|== | 3%
|
|== | 4%
|
|=== | 4%
|
|=== | 5%
|
|=== | 6%
|
|==== | 6%
|
|==== | 7%
|
|===== | 8%
|
|===== | 9%
|
|====== | 9%
|
|====== | 10%
|
|====== | 11%
|
|======= | 11%
|
|======= | 12%
|
|======== | 13%
|
|======== | 14%
|
|========= | 14%
|
|========= | 15%
|
|========= | 16%
|
|========== | 16%
|
|========== | 17%
|
|=========== | 18%
|
|=========== | 19%
|
|============ | 19%
|
|============ | 20%
|
|============ | 21%
|
|============= | 21%
|
|============= | 22%
|
|============== | 23%
|
|============== | 24%
|
|=============== | 24%
|
|=============== | 25%
|
|=============== | 26%
|
|================ | 26%
|
|================ | 27%
|
|================= | 28%
|
|================= | 29%
|
|================== | 29%
|
|================== | 30%
|
|================== | 31%
|
|=================== | 31%
|
|=================== | 32%
|
|==================== | 33%
|
|==================== | 34%
|
|===================== | 34%
|
|===================== | 35%
|
|===================== | 36%
|
|====================== | 36%
|
|====================== | 37%
|
|======================= | 38%
|
|======================= | 39%
|
|======================== | 39%
|
|======================== | 40%
|
|======================== | 41%
|
|========================= | 41%
|
|========================= | 42%
|
|========================== | 43%
|
|========================== | 44%
|
|=========================== | 44%
|
|=========================== | 45%
|
|=========================== | 46%
|
|============================ | 46%
|
|============================ | 47%
|
|============================= | 48%
|
|============================= | 49%
|
|============================== | 49%
|
|============================== | 50%
|
|============================== | 51%
|
|=============================== | 51%
|
|=============================== | 52%
|
|================================ | 53%
|
|================================ | 54%
|
|================================= | 54%
|
|================================= | 55%
|
|================================= | 56%
|
|================================== | 56%
|
|================================== | 57%
|
|=================================== | 58%
|
|=================================== | 59%
|
|==================================== | 59%
|
|==================================== | 60%
|
|==================================== | 61%
|
|===================================== | 61%
|
|===================================== | 62%
|
|====================================== | 63%
|
|====================================== | 64%
|
|======================================= | 64%
|
|======================================= | 65%
|
|======================================= | 66%
|
|======================================== | 66%
|
|======================================== | 67%
|
|========================================= | 68%
|
|========================================= | 69%
|
|========================================== | 69%
|
|========================================== | 70%
|
|========================================== | 71%
|
|=========================================== | 71%
|
|=========================================== | 72%
|
|============================================ | 73%
|
|============================================ | 74%
|
|============================================= | 74%
|
|============================================= | 75%
|
|============================================= | 76%
|
|============================================== | 76%
|
|============================================== | 77%
|
|=============================================== | 78%
|
|=============================================== | 79%
|
|================================================ | 79%
|
|================================================ | 80%
|
|================================================ | 81%
|
|================================================= | 81%
|
|================================================= | 82%
|
|================================================== | 83%
|
|================================================== | 84%
|
|=================================================== | 84%
|
|=================================================== | 85%
|
|=================================================== | 86%
|
|==================================================== | 86%
|
|==================================================== | 87%
|
|===================================================== | 88%
|
|===================================================== | 89%
|
|====================================================== | 89%
|
|====================================================== | 90%
|
|====================================================== | 91%
|
|======================================================= | 91%
|
|======================================================= | 92%
|
|======================================================== | 93%
|
|======================================================== | 94%
|
|========================================================= | 94%
|
|========================================================= | 95%
|
|========================================================= | 96%
|
|========================================================== | 96%
|
|========================================================== | 97%
|
|=========================================================== | 98%
|
|=========================================================== | 99%
|
|============================================================| 99%
|
|============================================================| 100%
#> Run completed!
#>
#>
#> Round 3
#> Next position with largest uncertainty at 50% level is 1000
print(newPositions)
#> [1] 830 630 1000
# Suppose you are only interested in dating the new depths at 500, 600, or 700 cm
newPositions2 <- choosePositions(GlenOut,
N = 2,
positions = seq(500, 700, by = 10)
)
#>
|
| | 0%
|
| | 1%
|
|= | 1%
|
|= | 2%
|
|== | 3%
|
|== | 4%
|
|=== | 4%
|
|=== | 5%
|
|=== | 6%
|
|==== | 6%
|
|==== | 7%
|
|===== | 8%
|
|===== | 9%
|
|====== | 9%
|
|====== | 10%
|
|====== | 11%
|
|======= | 11%
|
|======= | 12%
|
|======== | 13%
|
|======== | 14%
|
|========= | 14%
|
|========= | 15%
|
|========= | 16%
|
|========== | 16%
|
|========== | 17%
|
|=========== | 18%
|
|=========== | 19%
|
|============ | 19%
|
|============ | 20%
|
|============ | 21%
|
|============= | 21%
|
|============= | 22%
|
|============== | 23%
|
|============== | 24%
|
|=============== | 24%
|
|=============== | 25%
|
|=============== | 26%
|
|================ | 26%
|
|================ | 27%
|
|================= | 28%
|
|================= | 29%
|
|================== | 29%
|
|================== | 30%
|
|================== | 31%
|
|=================== | 31%
|
|=================== | 32%
|
|==================== | 33%
|
|==================== | 34%
|
|===================== | 34%
|
|===================== | 35%
|
|===================== | 36%
|
|====================== | 36%
|
|====================== | 37%
|
|======================= | 38%
|
|======================= | 39%
|
|======================== | 39%
|
|======================== | 40%
|
|======================== | 41%
|
|========================= | 41%
|
|========================= | 42%
|
|========================== | 43%
|
|========================== | 44%
|
|=========================== | 44%
|
|=========================== | 45%
|
|=========================== | 46%
|
|============================ | 46%
|
|============================ | 47%
|
|============================= | 48%
|
|============================= | 49%
|
|============================== | 49%
|
|============================== | 50%
|
|============================== | 51%
|
|=============================== | 51%
|
|=============================== | 52%
|
|================================ | 53%
|
|================================ | 54%
|
|================================= | 54%
|
|================================= | 55%
|
|================================= | 56%
|
|================================== | 56%
|
|================================== | 57%
|
|=================================== | 58%
|
|=================================== | 59%
|
|==================================== | 59%
|
|==================================== | 60%
|
|==================================== | 61%
|
|===================================== | 61%
|
|===================================== | 62%
|
|====================================== | 63%
|
|====================================== | 64%
|
|======================================= | 64%
|
|======================================= | 65%
|
|======================================= | 66%
|
|======================================== | 66%
|
|======================================== | 67%
|
|========================================= | 68%
|
|========================================= | 69%
|
|========================================== | 69%
|
|========================================== | 70%
|
|========================================== | 71%
|
|=========================================== | 71%
|
|=========================================== | 72%
|
|============================================ | 73%
|
|============================================ | 74%
|
|============================================= | 74%
|
|============================================= | 75%
|
|============================================= | 76%
|
|============================================== | 76%
|
|============================================== | 77%
|
|=============================================== | 78%
|
|=============================================== | 79%
|
|================================================ | 79%
|
|================================================ | 80%
|
|================================================ | 81%
|
|================================================= | 81%
|
|================================================= | 82%
|
|================================================== | 83%
|
|================================================== | 84%
|
|=================================================== | 84%
|
|=================================================== | 85%
|
|=================================================== | 86%
|
|==================================================== | 86%
|
|==================================================== | 87%
|
|===================================================== | 88%
|
|===================================================== | 89%
|
|====================================================== | 89%
|
|====================================================== | 90%
|
|====================================================== | 91%
|
|======================================================= | 91%
|
|======================================================= | 92%
|
|======================================================== | 93%
|
|======================================================== | 94%
|
|========================================================= | 94%
|
|========================================================= | 95%
|
|========================================================= | 96%
|
|========================================================== | 96%
|
|========================================================== | 97%
|
|=========================================================== | 98%
|
|=========================================================== | 99%
|
|============================================================| 99%
|
|============================================================| 100%
#> Round 1
#> Position with largest uncertainty at 50% level is 690
#>
|
|================================================================| 100%
#> Calibrating with new age 4464 with sd 30 at position 690
#> Running Bchronology...
#>
|
| | 0%
|
| | 1%
|
|= | 1%
|
|= | 2%
|
|== | 3%
|
|== | 4%
|
|=== | 4%
|
|=== | 5%
|
|=== | 6%
|
|==== | 6%
|
|==== | 7%
|
|===== | 8%
|
|===== | 9%
|
|====== | 9%
|
|====== | 10%
|
|====== | 11%
|
|======= | 11%
|
|======= | 12%
|
|======== | 13%
|
|======== | 14%
|
|========= | 14%
|
|========= | 15%
|
|========= | 16%
|
|========== | 16%
|
|========== | 17%
|
|=========== | 18%
|
|=========== | 19%
|
|============ | 19%
|
|============ | 20%
|
|============ | 21%
|
|============= | 21%
|
|============= | 22%
|
|============== | 23%
|
|============== | 24%
|
|=============== | 24%
|
|=============== | 25%
|
|=============== | 26%
|
|================ | 26%
|
|================ | 27%
|
|================= | 28%
|
|================= | 29%
|
|================== | 29%
|
|================== | 30%
|
|================== | 31%
|
|=================== | 31%
|
|=================== | 32%
|
|==================== | 33%
|
|==================== | 34%
|
|===================== | 34%
|
|===================== | 35%
|
|===================== | 36%
|
|====================== | 36%
|
|====================== | 37%
|
|======================= | 38%
|
|======================= | 39%
|
|======================== | 39%
|
|======================== | 40%
|
|======================== | 41%
|
|========================= | 41%
|
|========================= | 42%
|
|========================== | 43%
|
|========================== | 44%
|
|=========================== | 44%
|
|=========================== | 45%
|
|=========================== | 46%
|
|============================ | 46%
|
|============================ | 47%
|
|============================= | 48%
|
|============================= | 49%
|
|============================== | 49%
|
|============================== | 50%
|
|============================== | 51%
|
|=============================== | 51%
|
|=============================== | 52%
|
|================================ | 53%
|
|================================ | 54%
|
|================================= | 54%
|
|================================= | 55%
|
|================================= | 56%
|
|================================== | 56%
|
|================================== | 57%
|
|=================================== | 58%
|
|=================================== | 59%
|
|==================================== | 59%
|
|==================================== | 60%
|
|==================================== | 61%
|
|===================================== | 61%
|
|===================================== | 62%
|
|====================================== | 63%
|
|====================================== | 64%
|
|======================================= | 64%
|
|======================================= | 65%
|
|======================================= | 66%
|
|======================================== | 66%
|
|======================================== | 67%
|
|========================================= | 68%
|
|========================================= | 69%
|
|========================================== | 69%
|
|========================================== | 70%
|
|========================================== | 71%
|
|=========================================== | 71%
|
|=========================================== | 72%
|
|============================================ | 73%
|
|============================================ | 74%
|
|============================================= | 74%
|
|============================================= | 75%
|
|============================================= | 76%
|
|============================================== | 76%
|
|============================================== | 77%
|
|=============================================== | 78%
|
|=============================================== | 79%
|
|================================================ | 79%
|
|================================================ | 80%
|
|================================================ | 81%
|
|================================================= | 81%
|
|================================================= | 82%
|
|================================================== | 83%
|
|================================================== | 84%
|
|=================================================== | 84%
|
|=================================================== | 85%
|
|=================================================== | 86%
|
|==================================================== | 86%
|
|==================================================== | 87%
|
|===================================================== | 88%
|
|===================================================== | 89%
|
|====================================================== | 89%
|
|====================================================== | 90%
|
|====================================================== | 91%
|
|======================================================= | 91%
|
|======================================================= | 92%
|
|======================================================== | 93%
|
|======================================================== | 94%
|
|========================================================= | 94%
|
|========================================================= | 95%
|
|========================================================= | 96%
|
|========================================================== | 96%
|
|========================================================== | 97%
|
|=========================================================== | 98%
|
|=========================================================== | 99%
|
|============================================================| 99%
|
|============================================================| 100%
#> Run completed!
#>
#>
#> Round 2
#> Next position with largest uncertainty at 50% level is 530
print(newPositions2)
#> [1] 690 530
# }