{"id":12,"date":"2017-04-12T14:15:00","date_gmt":"2017-04-12T13:15:00","guid":{"rendered":"http:\/\/research.shca.ed.ac.uk\/past-by-numbers\/?p=12"},"modified":"2017-04-28T10:14:30","modified_gmt":"2017-04-28T09:14:30","slug":"calibrating-c14-dates","status":"publish","type":"post","link":"http:\/\/research.shca.ed.ac.uk\/past-by-numbers\/2017\/04\/12\/calibrating-c14-dates\/","title":{"rendered":"Calibrating C14 dates"},"content":{"rendered":"<p>C14 sampling is the most popular technique that archaeologists use to estimate absolute dates of sites. The method uses an organic sample to measure radiocarbon age that finally needs to be calibrated to calendar years (see the <strong><a href=\"https:\/\/en.wikipedia.org\/wiki\/Calibration_of_radiocarbon_dates\">Wikipedia<\/a><\/strong> entry for details).<\/p>\n<p>I have always been puzzled that C14 samples are typically calibrated using specialized proprietary software. I don&#8217;t usually work with C14 but I was curious to see if you can calibrate samples using R (the language I used for everyday statistical stuff). The answer is that someone already created a package for this (surprise, surprise). It is called <a href=\"https:\/\/cran.r-project.org\/web\/packages\/Bchron\/index.html\"><strong>bchron<\/strong><\/a> and was developed by Andrew Parnell<strong>.<\/strong><\/p>\n<h3>Install and load the library<\/h3>\n[generic linenumbers=&#8221;False&#8221;]\ninstall.packages(&#8220;Bchron&#8221;)<br \/>\nlibrary(Bchron)<br \/>\n[\/generic]\n<h3>Load a dataset<\/h3>\n<p>You will need a data frame with at least 2 columns: a) age and b) standard deviation. I used data from the amazing Maes Howe cairn in Orkney islands collected from the Scottish Radiocarbon Database in <a href=\"https:\/\/canmore.org.uk\/c14index\/2094\">Canmore<\/a>.<\/p>\n[generic linenumbers=&#8221;False&#8221;]\nc14 &lt;- read.csv(&quot;https:\/\/git.io\/vS0mY&quot;)<br \/>\n[\/generic]\n<h3>Calibrate!<\/h3>\n<p>Bchron provides a function called BchronCalibrate receiving 4 parameters:<\/p>\n<ol>\n<li>age<\/li>\n<li>deviation<\/li>\n<li>curve<\/li>\n<li>sample Id <em>optional<\/em><\/li>\n<\/ol>\n<p>You can calibrate a single date:<br \/>\n[generic linenumbers=&quot;False&quot;]\nsingleResult &lt;- BchronCalibrate(3765, 70, &quot;intcal13&quot;, &quot;Q-1481&quot;)<br \/>\nplot(singleResult)<br \/>\n[\/generic]\n<p>The cool thing here is that you can also pass a list of values to each parameter instead of a single value. If you do this then you will calibrate all dates at the same time:<\/p>\n[generic linenumbers=&quot;False&quot;]\nresults &lt;- BchronCalibrate(c14$age, c14$ageSd, rep(&quot;intcal13&quot;, nrow(c14)), c14$labId)<br \/>\n[\/generic]\n<p>As you can see in this code block we are pass the columns <em>age<\/em> and <em>ageSd<\/em> as the first 2 parameters. The third parameter is a list of <em>&quot;intcal13&quot;<\/em> as long as our sample size (so you are saying that each sample will be calibrated using the <em>&quot;intcal13<\/em>&quot; curve). We use the column <em>labId<\/em> as the last argument to help us identify each sample.<\/p>\n<p>So&#8230;that&#039;s it! You can cycle through the calibrated samples with:<br \/>\n[generic linenumbers=&quot;False&quot;]\nplot(results,pause=T)<br \/>\n[\/generic]\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/research.shca.ed.ac.uk\/past-by-numbers\/wp-content\/uploads\/sites\/7\/2017\/04\/c14-1024x1024.png\" alt=\"\" width=\"840\" height=\"840\" class=\"size-large wp-image-26\" srcset=\"http:\/\/research.shca.ed.ac.uk\/past-by-numbers\/wp-content\/uploads\/sites\/7\/2017\/04\/c14-1024x1024.png 1024w, http:\/\/research.shca.ed.ac.uk\/past-by-numbers\/wp-content\/uploads\/sites\/7\/2017\/04\/c14-150x150.png 150w, http:\/\/research.shca.ed.ac.uk\/past-by-numbers\/wp-content\/uploads\/sites\/7\/2017\/04\/c14-300x300.png 300w, http:\/\/research.shca.ed.ac.uk\/past-by-numbers\/wp-content\/uploads\/sites\/7\/2017\/04\/c14-768x768.png 768w, http:\/\/research.shca.ed.ac.uk\/past-by-numbers\/wp-content\/uploads\/sites\/7\/2017\/04\/c14-600x600.png 600w, http:\/\/research.shca.ed.ac.uk\/past-by-numbers\/wp-content\/uploads\/sites\/7\/2017\/04\/c14-1200x1200.png 1200w\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" \/>\n<p>You can also export the calibrated samples to a pdf document:<br \/>\n[generic linenumbers=&#8221;False&#8221;]\npdf(&#8220;calibrated.pdf&#8221;)<br \/>\nplot(results)<br \/>\ndev.off()<br \/>\n[\/generic]\n","protected":false},"excerpt":{"rendered":"<p>C14 sampling is the most popular technique that archaeologists use to estimate absolute dates of sites. The method uses an organic sample to measure radiocarbon age that finally needs to be calibrated to calendar years (see the Wikipedia entry for details). I have always been puzzled that C14 samples are typically calibrated using specialized proprietary [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[3,5],"class_list":["post-12","post","type-post","status-publish","format-standard","hentry","category-r","tag-r","tag-statistics"],"_links":{"self":[{"href":"http:\/\/research.shca.ed.ac.uk\/past-by-numbers\/wp-json\/wp\/v2\/posts\/12","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/research.shca.ed.ac.uk\/past-by-numbers\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/research.shca.ed.ac.uk\/past-by-numbers\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/research.shca.ed.ac.uk\/past-by-numbers\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"http:\/\/research.shca.ed.ac.uk\/past-by-numbers\/wp-json\/wp\/v2\/comments?post=12"}],"version-history":[{"count":21,"href":"http:\/\/research.shca.ed.ac.uk\/past-by-numbers\/wp-json\/wp\/v2\/posts\/12\/revisions"}],"predecessor-version":[{"id":168,"href":"http:\/\/research.shca.ed.ac.uk\/past-by-numbers\/wp-json\/wp\/v2\/posts\/12\/revisions\/168"}],"wp:attachment":[{"href":"http:\/\/research.shca.ed.ac.uk\/past-by-numbers\/wp-json\/wp\/v2\/media?parent=12"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/research.shca.ed.ac.uk\/past-by-numbers\/wp-json\/wp\/v2\/categories?post=12"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/research.shca.ed.ac.uk\/past-by-numbers\/wp-json\/wp\/v2\/tags?post=12"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}