ISAAKiel / oxcAAR

R Package - Interaction with Oxcal
GNU General Public License v2.0
21 stars 4 forks source link

Dev parse modeled dates #19

Closed MartinHinz closed 6 years ago

MartinHinz commented 6 years ago

posterior probabilities are now parsed from OxCal output file and printed via format rsp. plotted in individual and list plots

codecov-io commented 6 years ago

Codecov Report

Merging #19 into master will decrease coverage by 2.18%. The diff coverage is 79.38%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #19      +/-   ##
=========================================
- Coverage   86.59%   84.4%   -2.19%     
=========================================
  Files          13      13              
  Lines         634     898     +264     
=========================================
+ Hits          549     758     +209     
- Misses         85     140      +55
Impacted Files Coverage Δ
R/parsing_functions.R 90.11% <69.56%> (-4.02%) :arrow_down:
R/oxcAARCalibratedDate.R 86.85% <83.68%> (-13.15%) :arrow_down:
R/oxcAARCalibratedDatesList.R 92.3% <87.27%> (-7.7%) :arrow_down:
R/utility_functions.R 88.52% <92%> (+0.71%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 26c2417...4db1162. Read the comment docs.

nevrome commented 6 years ago

That's a very nice feature. But shouldn't the posterior probabilities output be more like the one you prepared for c14bazAAR?

library(magrittr)
library(c14bazAAR)

get_aDRAC() %>% calibrate() %$% calrange %>% magrittr::extract2(1)
dens from to
58.2 2325 2490
2.5 2603 2606
33.2 2643 2676

It's nice to know the full range, but it's also misleading.

MartinHinz commented 6 years ago

Thank you for the valuable remark! Does 8065ae9e81a038e1ee16e47bbae9192d77e63c41 format the date as needed?

nevrome commented 6 years ago

Nice! But it breaks the plot. What about this (c5cffa209330101a63ef6364cd4f20eda1ed58fd) solution? Not perfect, but at least without overlaps.

MartinHinz commented 6 years ago

Thank you, @nevrome, did some improvement (?) yesterday on the plane, so I merged yours proposal partly in. Now plots should work and look much better.

nevrome commented 6 years ago

Unfortunately something is broken now. This code from the vignette doesn't work anymore:

my_sum_sim<-oxcalSumSim(
  timeframe_begin = -4000,
  timeframe_end = -3000,
  n = 50,
  stds = 35,
  date_distribution = "uniform"
  )
str(my_sum_sim)
plot(my_sum_sim)

I guess you can solve this much faster than I can.

MartinHinz commented 6 years ago

This time checked and tested, no errors, notes or warnings. Should have done that, of course, in the first place.