The function provides an interface from R to DRAC. An R-object or a pre-formatted XLS/XLSX file is passed to the DRAC website and the results are re-imported into R.
use_DRAC(file, name, print_references = TRUE, citation_style = "text", ...)
file | character (required):
spreadsheet to be passed to the DRAC website for calculation. Can also be a
DRAC template object obtained from |
---|---|
name | character (with default): Optional user name submitted to DRAC. If omitted, a random name will be generated |
print_references | (with default): Print all references used in the input data table to the console. |
citation_style | (with default):
If |
... | Further arguments. |
Returns an RLum.Results object containing the following elements:
list: a named list containing the following elements in slot @data
:
$highlights | data.frame | summary of 25 most important input/output fields |
$header | character | HTTP header from the DRAC server response |
$labels | data.frame | descriptive headers of all input/output fields |
$content | data.frame | complete DRAC input/output table |
$input | data.frame | DRAC input table |
$output | data.frame | DRAC output table |
references | list | A list of bib entries of used references |
character or list path to the input spreadsheet or a DRAC template
call the function call
list used arguments
0.1.3
Kreutzer, S., Dietze, M., Burow, C., 2021. use_DRAC(): Use DRAC to calculate dose rate data. Function version 0.1.3. In: Kreutzer, S., Burow, C., Dietze, M., Fuchs, M.C., Schmidt, C., Fischer, M., Friedrich, J., Mercier, N., Riedesel, S., Autzen, M., Mittelstrass, D., Gray, H.J., 2021. Luminescence: Comprehensive Luminescence Dating Data Analysis. R package version 0.9.11. https://CRAN.R-project.org/package=Luminescence
Durcan, J.A., King, G.E., Duller, G.A.T., 2015. DRAC: Dose Rate and Age Calculator for trapped charge dating. Quaternary Geochronology 28, 54-61. doi:10.1016/j.quageo.2015.03.012
Sebastian Kreutzer, Geography & Earth Sciences, Aberystwyth University (United Kingdom)
Michael Dietze, GFZ Potsdam (Germany)
Christoph Burow, University of Cologne (Germany)
, RLum Developer Team
## (1) Method using the DRAC spreadsheet file <- "/PATH/TO/DRAC_Input_Template.csv" # send the actual IO template spreadsheet to DRAC if (FALSE) { use_DRAC(file = file) } ## (2) Method using an R template object # Create a template input <- template_DRAC(preset = "DRAC-example_quartz")#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#>#># Fill the template with values input$`Project ID` <- "DRAC-Example" input$`Sample ID` <- "Quartz" input$`Conversion factors` <- "AdamiecAitken1998" input$`External U (ppm)` <- 3.4 input$`errExternal U (ppm)` <- 0.51 input$`External Th (ppm)` <- 14.47 input$`errExternal Th (ppm)` <- 1.69 input$`External K (%)` <- 1.2 input$`errExternal K (%)` <- 0.14 input$`Calculate external Rb from K conc?` <- "N" input$`Calculate internal Rb from K conc?` <- "N" input$`Scale gammadoserate at shallow depths?` <- "N" input$`Grain size min (microns)` <- 90 input$`Grain size max (microns)` <- 125 input$`Water content ((wet weight - dry weight)/dry weight) %` <- 5 input$`errWater content %` <- 2 input$`Depth (m)` <- 2.2 input$`errDepth (m)` <- 0.22 input$`Overburden density (g cm-3)` <- 1.8 input$`errOverburden density (g cm-3)` <- 0.1 input$`Latitude (decimal degrees)` <- 30.0000 input$`Longitude (decimal degrees)` <- 70.0000 input$`Altitude (m)` <- 150 input$`De (Gy)` <- 20 input$`errDe (Gy)` <- 0.2 # use DRAC if (FALSE) { output <- use_DRAC(input) }