Running ‘testthat.R’ [35s/38s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(Luminescence)
  Loading required package: magrittr
  
  Attaching package: 'magrittr'
  
  The following objects are masked from 'package:testthat':
  
      equals, is_less_than, not
  
  Welcome to the R package Luminescence version 0.8.6 [Built: 2018-10-21 14:03:12 UTC]
  The natural dose: 'You only live once.'
  > 
  > test_check("Luminescence")
  ── 1. Error: (unknown) (@test_calc_AliquotSize.R#4)  ───────────────────────────
  replacement has 1 row, data has 0
  1: calc_AliquotSize(grain.size = c(100, 150), sample.diameter = 1, MC.iter = 100, plot = FALSE, 
         verbose = FALSE) at testthat/test_calc_AliquotSize.R:4
  2: calc_Statistics(as.data.frame(cbind(MC.n, 1e-04)))
  3: `[<-`(`*tmp*`, is.na(data[, 2]), 2, value = 0)
  4: `[<-.data.frame`(`*tmp*`, is.na(data[, 2]), 2, value = 0)
  5: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, n), domain = NA)
  
  
  
   [calc_CosmicDoseRate]
  
   ---------------------------------------------------------
   depth (m)              : 2.78
   density (g cm^-3)      : 1.7
   latitude (N deg.)      : 38.06451
   longitude (E deg.)     : 1.49646
   altitude (m)           : 364
   ---------------------------------------------------------
   total absorber (g cm^-2)       : 472.6
  
   cosmic dose rate (Gy ka^-1)    : 0.1518
    [@sea-level & 55 deg. N G.lat]
  
   geomagnetic latitude (deg.)    : 41.1
  
   cosmic dose rate (Gy ka^-1)    : 0.161 +- 0.0161
    [corrected]                 
   ---------------------------------------------------------
  
  ── 2. Error: (unknown) (@test_calc_FuchsLang2001.R#4)  ─────────────────────────
  replacement has 2 rows, data has 1
  1: calc_FuchsLang2001(ExampleData.DeValues$BT998, cvThreshold = 5, plot = FALSE, verbose = FALSE) at testthat/test_calc_FuchsLang2001.R:4
  2: `[<-`(`*tmp*`, endDeValue, 1, value = 2636.69)
  3: `[<-.data.frame`(`*tmp*`, endDeValue, 1, value = 2636.69)
  4: xpdrows.data.frame(x, rows, new.rows)
  5: `[[<-`(`*tmp*`, i, value = c(2529.17, NA))
  6: `[[<-.data.frame`(`*tmp*`, i, value = c(2529.17, NA))
  7: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, nrows), domain = NA)
  
  
   [calc_HomogeneityTest()]
  
   ---------------------------------
   n:                  7
   ---------------------------------
   mu:                 3.7727
   G-value:            19.2505
   Degrees of freedom: 6
   P-value:            0.0038
   ---------------------------------
  
  ── 3. Error: (unknown) (@test_calc_Statistics.R#8)  ────────────────────────────
  replacement has 1 row, data has 0
  1: calc_Statistics(ExampleData.DeValues$BT998, n.MCM = 1000) at testthat/test_calc_Statistics.R:8
  2: `[<-`(`*tmp*`, is.na(data[, 2]), 2, value = 0)
  3: `[<-.data.frame`(`*tmp*`, is.na(data[, 2]), 2, value = 0)
  4: stop(sprintf(ngettext(N, "replacement has %d row, data has %d", "replacement has %d rows, data has %d"), 
         N, n), domain = NA)
  
  
  [fit_CWCurve()]
  
  Fitting was finally done using a 3-component function (max=4):
  ------------------------------------------------------------------------------
  y ~ I0.1 * lambda.1 * exp(-lambda.1 * x) + I0.2 * lambda.2 * exp(-lambda.2 * x) + I0.3 * lambda.3 * exp(-lambda.3 * x)
  
           I0 I0.error     lambda lambda.error           cs cs.rel
  c1 2387.617       NA 4.59054005           NA 5.389396e-17 1.0000
  c2 1053.492       NA 1.95936493           NA 2.300338e-17 0.4268
  c3 2816.629       NA 0.02054734           NA 2.412303e-19 0.0045
  ------------------------------------------------------------------------------
  pseudo-R^2 = 0.9995
  [fit_LMCurve] >> Background subtracted (method="polynomial")!
  
  [fit_LMCurve()]
  
  Fitting was done using a 3-component function:
  
         xm1        xm2        xm3        Im1        Im2        Im3 
    49.00643  204.40083 1591.66448  169.44002   23.00741  405.46171 
  
  (equation used for fitting according Kitis & Pagonis, 2008)
  ------------------------------------------------------------------------------
  (1) Corresponding values according the equation in Bulur, 1996 for b and n0:
  
  b1 = 1.665536e+00 +/- NA
  n01 = 1.36904e+04 +/- NA
  
  b2 = 9.574028e-02 +/- NA
  n02 = 7.753496e+03 +/- NA
  
  b3 = 1.578908e-03 +/- NA
  n03 = 1.064017e+06 +/- NA
  
  cs from component.1 = 1.955e-17 cm^2	 >> relative: 1
  cs from component.2 = 1.124e-18 cm^2	 >> relative: 0.0575
  cs from component.3 = 1.854e-20 cm^2	 >> relative: 9e-04
  
  (stimulation intensity value used for calculation: 8.517726e+16 1/s 1/cm^2)
  (errors quoted as 1-sigma uncertainties)
  ------------------------------------------------------------------------------
  
  pseudo-R^2 = 0.9437
  [fit_LMCurve] >> Background subtracted (method="polynomial")!
  
  [fit_LMCurve()]
  
  Fitting was done using a 3-component function:
  
        xm.1       xm.2       xm.3       Im.1       Im.2       Im.3 
    49.00509  204.34969 1591.66300  169.43653   23.01176  405.46223 
  
  (equation used for fitting according Kitis & Pagonis, 2008)
  ------------------------------------------------------------------------------
  (1) Corresponding values according the equation in Bulur, 1996 for b and n0:
  
  b1 = 1.665626e+00 +/- NA
  n01 = 1.368975e+04 +/- NA
  
  b2 = 9.57882e-02 +/- NA
  n02 = 7.753022e+03 +/- NA
  
  b3 = 1.578911e-03 +/- NA
  n03 = 1.064017e+06 +/- NA
  
  cs from component.1 = 1.955e-17 cm^2	 >> relative: 1
  cs from component.2 = 1.125e-18 cm^2	 >> relative: 0.0575
  cs from component.3 = 1.854e-20 cm^2	 >> relative: 9e-04
  
  (stimulation intensity value used for calculation: 8.517726e+16 1/s 1/cm^2)
  (errors quoted as 1-sigma uncertainties)
  ------------------------------------------------------------------------------
  
  pseudo-R^2 = 0.9437
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 22 SKIPPED: 134 FAILED: 3
  1. Error: (unknown) (@test_calc_AliquotSize.R#4) 
  2. Error: (unknown) (@test_calc_FuchsLang2001.R#4) 
  3. Error: (unknown) (@test_calc_Statistics.R#8) 
  
  Error: testthat unit tests failed
  Execution halted