'LazyData' is specified without a 'data' directory
'LazyData' is specified without a 'data' directory
'LazyData' is specified without a 'data' directory
Running examples in ‘bioset-Ex.R’ failed
The error most likely occurred in:

> ### Name: calc_factor_conc
> ### Title: Get a factor to convert concentrations.
> ### Aliases: calc_factor_conc
> 
> ### ** Examples
> 
> library("dplyr")

Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

    filter, lag

The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union

> 
> # generate test data
> data <- tibble(
+   sample = c("A", "B", "C"),
+   conc = c(4.5, 2.3, 5.1),       # concentration in g  / l
+ )
> 
> fctr_ng_ml <- calc_factor_conc(from = "g/l", to = "ng/ml")
Error in is.character(x) && nchar(x) > 0 : 
  'length = 2' in coercion to 'logical(1)'
Calls: calc_factor_conc -> canonicalise_units -> %in% -> is_recognised_unit
Execution halted
Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(bioset)
  > 
  > test_check("bioset")
  [ FAIL 2 | WARN 3 | SKIP 0 | PASS 61 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test_calc.R:6:3): canonicalise_units works as expected ───────────────
  Error in `is.character(x) && nchar(x) > 0`: 'length = 2' in coercion to 'logical(1)'
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(...) at test_calc.R:6:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─bioset:::canonicalise_units(" µ l / \tf g\t")
   5.   ├─FALSE %in% is_recognised_unit(parts)
   6.   └─bioset:::is_recognised_unit(parts)
  ── Error (test_calc.R:65:3): concentration are converted correctly ─────────────
  Error in `is.character(x) && nchar(x) > 0`: 'length = 2' in coercion to 'logical(1)'
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(calc_factor_conc("M", "mM"), 1000) at test_calc.R:65:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─bioset::calc_factor_conc("M", "mM")
   5.   └─bioset:::canonicalise_units(from)
   6.     ├─FALSE %in% is_recognised_unit(parts)
   7.     └─bioset:::is_recognised_unit(parts)
  
  [ FAIL 2 | WARN 3 | SKIP 0 | PASS 61 ]
  Error: Test failures
  Execution halted
'LazyData' is specified without a 'data' directory
Running examples in ‘bioset-Ex.R’ failed
The error most likely occurred in:

> ### Name: calc_factor_conc
> ### Title: Get a factor to convert concentrations.
> ### Aliases: calc_factor_conc
> 
> ### ** Examples
> 
> library("dplyr")

Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

    filter, lag

The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union

> 
> # generate test data
> data <- tibble(
+   sample = c("A", "B", "C"),
+   conc = c(4.5, 2.3, 5.1),       # concentration in g  / l
+ )
> 
> fctr_ng_ml <- calc_factor_conc(from = "g/l", to = "ng/ml")
Error in is.character(x) && nchar(x) > 0 : 
  'length = 2' in coercion to 'logical(1)'
Calls: calc_factor_conc -> canonicalise_units -> %in% -> is_recognised_unit
Execution halted
Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(bioset)
  > 
  > test_check("bioset")
  [ FAIL 2 | WARN 3 | SKIP 0 | PASS 61 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test_calc.R:6:3): canonicalise_units works as expected ───────────────
  Error in `is.character(x) && nchar(x) > 0`: 'length = 2' in coercion to 'logical(1)'
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(...) at test_calc.R:6:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─bioset:::canonicalise_units(" µ l / \tf g\t")
   5.   ├─FALSE %in% is_recognised_unit(parts)
   6.   └─bioset:::is_recognised_unit(parts)
  ── Error (test_calc.R:65:3): concentration are converted correctly ─────────────
  Error in `is.character(x) && nchar(x) > 0`: 'length = 2' in coercion to 'logical(1)'
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(calc_factor_conc("M", "mM"), 1000) at test_calc.R:65:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─bioset::calc_factor_conc("M", "mM")
   5.   └─bioset:::canonicalise_units(from)
   6.     ├─FALSE %in% is_recognised_unit(parts)
   7.     └─bioset:::is_recognised_unit(parts)
  
  [ FAIL 2 | WARN 3 | SKIP 0 | PASS 61 ]
  Error: Test failures
  Execution halted
'LazyData' is specified without a 'data' directory
'LazyData' is specified without a 'data' directory
'LazyData' is specified without a 'data' directory
'LazyData' is specified without a 'data' directory
'LazyData' is specified without a 'data' directory
'LazyData' is specified without a 'data' directory
'LazyData' is specified without a 'data' directory
'LazyData' is specified without a 'data' directory
'LazyData' is specified without a 'data' directory