Running 'testthat.R' [6s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(traitdataform)
  > 
  > test_check("traitdataform")
  -- 1. Error: (unknown) (@test.columns_to_ETS.R#5)  -----------------------------
  attempt to set an attribute on NULL
  1: pulldata("arthropodtraits") at testthat/test.columns_to_ETS.R:5
  2: source(system.file("extdata", paste0(x, ".R"), package = "traitdataform"))
  3: source(system.file("extdata", paste0(x, ".R"), package = "traitdataform"))
  4: withVisible(eval(ei, envir))
  5: eval(ei, envir)
  6: eval(ei, envir)
  
  -- 2. Error: (unknown) (@test.map_gbif_taxonomy.R#7)  --------------------------
  attempt to set an attribute on NULL
  1: pulldata("arthropodtraits") at testthat/test.map_gbif_taxonomy.R:7
  2: source(system.file("extdata", paste0(x, ".R"), package = "traitdataform"))
  3: source(system.file("extdata", paste0(x, ".R"), package = "traitdataform"))
  4: withVisible(eval(ei, envir))
  5: eval(ei, envir)
  6: eval(ei, envir)
  
  -- 3. Error: mapping of taxa works (@test.standardize.R#7)  --------------------
  id variables not found in data: scientificName
  1: as.traitdata(carabids) at testthat/test.standardize.R:7
  2: suppressWarnings(reshape2::melt(x, measure.vars = traits[traits %in% colnames(x)], 
         variable_name = "traitName", id.vars = c("scientificName", c("occurrenceID")[!is.null(occurrences)], 
             c("measurementID")[!is.null(measurements)], id.vars), na.rm = na.rm))
  3: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  4: reshape2::melt(x, measure.vars = traits[traits %in% colnames(x)], variable_name = "traitName", 
         id.vars = c("scientificName", c("occurrenceID")[!is.null(occurrences)], c("measurementID")[!is.null(measurements)], 
             id.vars), na.rm = na.rm)
  5: melt.data.frame(x, measure.vars = traits[traits %in% colnames(x)], variable_name = "traitName", 
         id.vars = c("scientificName", c("occurrenceID")[!is.null(occurrences)], c("measurementID")[!is.null(measurements)], 
             id.vars), na.rm = na.rm)
  6: melt_check(data, id.vars, measure.vars, variable.name, value.name)
  7: stop("id variables not found in data: ", vars, call. = FALSE)
  
  -- 4. Error: factor level harmonizationworks (@test.standardize.R#79)  ---------
  attempt to set an attribute on NULL
  1: pulldata("arthropodtraits") at testthat/test.standardize.R:79
  2: source(system.file("extdata", paste0(x, ".R"), package = "traitdataform"))
  3: source(system.file("extdata", paste0(x, ".R"), package = "traitdataform"))
  4: withVisible(eval(ei, envir))
  5: eval(ei, envir)
  6: eval(ei, envir)
  
  == testthat results  ===========================================================
  [ OK: 1 | SKIPPED: 0 | WARNINGS: 2 | FAILED: 4 ]
  1. Error: (unknown) (@test.columns_to_ETS.R#5) 
  2. Error: (unknown) (@test.map_gbif_taxonomy.R#7) 
  3. Error: mapping of taxa works (@test.standardize.R#7) 
  4. Error: factor level harmonizationworks (@test.standardize.R#79) 
  
  Error: testthat unit tests failed
  Execution halted