Running 'testthat.R' [141s/157s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(beadplexr)
  > 
  > test_check("beadplexr")
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  beadplexr
   --- call from context --- 
  .f(.x[[i]], ...)
   --- call from argument --- 
  if ((class(.x) == "matrix") & is.numeric(.x)) {
      TRUE %in% (.p %in% colnames(.x))
  } else {
      FALSE
  }
   --- R stacktrace ---
  where 1: .f(.x[[i]], ...)
  where 2: purrr::map_lgl(., .get_potential_comp_matrices, .p = ff_parameters)
  where 3: function_list[[k]](value)
  where 4: withVisible(function_list[[k]](value))
  where 5: freduce(value, `_function_list`)
  where 6: `_fseq`(`_lhs`)
  where 7: eval(quote(`_fseq`(`_lhs`)), env, env)
  where 8: eval(quote(`_fseq`(`_lhs`)), env, env)
  where 9: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  where 10: ff_keywords %>% purrr::map_lgl(.get_potential_comp_matrices, 
      .p = ff_parameters)
  where 11: apply_compensation(.flow_frame = .flow_frame, .compensation = "guess")
  where 12: eval_bare(expr, quo_get_env(quo))
  where 13: quasi_label(enquo(object), label, arg = "object")
  where 14 at testthat/test_read_fcs.R#55: expect_is(apply_compensation(.flow_frame = .flow_frame, .compensation = "guess"), 
      "flowFrame")
  where 15: eval(code, test_env)
  where 16: eval(code, test_env)
  where 17: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 18: doTryCatch(return(expr), name, parentenv, handler)
  where 19: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 20: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 21: doTryCatch(return(expr), name, parentenv, handler)
  where 22: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 23: tryCatchList(expr, classes, parentenv, handlers)
  where 24: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 25: test_code(desc, code, env = parent.frame())
  where 26 at testthat/test_read_fcs.R#53: test_that("Compensation can be applied", {
      expect_is(apply_compensation(.flow_frame = .flow_frame, .compensation = NULL), 
          "flowFrame")
      expect_is(apply_compensation(.flow_frame = .flow_frame, .compensation = "guess"), 
          "flowFrame")
      expect_is(apply_compensation(.flow_frame = .flow_frame, .compensation = "SPILL"), 
          "flowFrame")
      expect_is(apply_compensation(.flow_frame = .flow_frame, .compensation = "spillover"), 
          "flowFrame")
      expect_is(apply_compensation(.flow_frame = .flow_frame, .compensation = comp_matrix), 
          "flowFrame")
      expect_warning(apply_compensation(.flow_frame = .flow_frame, 
          .compensation = c("guess", "xxx")))
      expect_warning(apply_compensation(.flow_frame = .flow_frame, 
          .compensation = "xxx"))
      expect_warning(apply_compensation(.flow_frame = odd_ff, .compensation = "guess"))
      expect_warning(apply_compensation(.flow_frame = odd_ff, .compensation = "spill"))
      expect_error(apply_compensation(.flow_frame = odd_ff, .compensation = list(list("guess", 
          "XXX"))))
      expect_error(apply_compensation(.flow_frame = odd_ff, .compensation = data.frame("guess", 
          "XXX")))
  })
  where 27: eval(code, test_env)
  where 28: eval(code, test_env)
  where 29: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 30: doTryCatch(return(expr), name, parentenv, handler)
  where 31: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 32: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 33: doTryCatch(return(expr), name, parentenv, handler)
  where 34: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 35: tryCatchList(expr, classes, parentenv, handlers)
  where 36: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 37: test_code(NULL, exprs, env)
  where 38: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 39: force(code)
  where 40: doWithOneRestart(return(expr), restart)
  where 41: withOneRestart(expr, restarts[[1L]])
  where 42: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 43: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 44: FUN(X[[i]], ...)
  where 45: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 46: force(code)
  where 47: doWithOneRestart(return(expr), restart)
  where 48: withOneRestart(expr, restarts[[1L]])
  where 49: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 50: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 51: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 52: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 53: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 54: test_check("beadplexr")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (.x, .p) 
  {
      if ((class(.x) == "matrix") & is.numeric(.x)) {
          TRUE %in% (.p %in% colnames(.x))
      }
      else {
          FALSE
      }
  }
  <bytecode: 0x84be448>
  <environment: 0x18107fd8>
   --- function search by body ---
   ----------- END OF FAILURE REPORT -------------- 
  -- 1. Error: Compensation can be applied (@test_read_fcs.R#55)  ----------------
  the condition has length > 1
  Backtrace:
    1. testthat::expect_is(...)
    4. beadplexr:::apply_compensation(.flow_frame = .flow_frame, .compensation = "guess")
    5. purrr::map_lgl(., .get_potential_comp_matrices, .p = ff_parameters)
   13. beadplexr:::.f(.x[[i]], ...)
   14. testthat::expect_is(...)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  beadplexr
   --- call from context --- 
  .f(.x[[i]], ...)
   --- call from argument --- 
  if ((class(.x) == "matrix") & is.numeric(.x)) {
      TRUE %in% (.p %in% colnames(.x))
  } else {
      FALSE
  }
   --- R stacktrace ---
  where 1: .f(.x[[i]], ...)
  where 2: purrr::map_lgl(., .get_potential_comp_matrices, .p = ff_parameters)
  where 3: function_list[[k]](value)
  where 4: withVisible(function_list[[k]](value))
  where 5: freduce(value, `_function_list`)
  where 6: `_fseq`(`_lhs`)
  where 7: eval(quote(`_fseq`(`_lhs`)), env, env)
  where 8: eval(quote(`_fseq`(`_lhs`)), env, env)
  where 9: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  where 10: ff_keywords %>% purrr::map_lgl(.get_potential_comp_matrices, 
      .p = ff_parameters)
  where 11: apply_compensation(., .compensation = .compensation)
  where 12: function_list[[i]](value)
  where 13: freduce(value, `_function_list`)
  where 14: `_fseq`(`_lhs`)
  where 15: eval(quote(`_fseq`(`_lhs`)), env, env)
  where 16: eval(quote(`_fseq`(`_lhs`)), env, env)
  where 17: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  where 18: flowCore::read.FCS(filename = .file_name, transformation = FALSE, 
      ...) %>% transform_bead_channels(.bead_channels = .bead_channels) %>% 
      apply_compensation(.compensation = .compensation) %>% remove_boundary_events(.channels = c(.fsc_ssc)) %>% 
      subset_channels(.filter = .filter) %>% as_data_frame_flow_frame(.channels = c(.fsc_ssc, 
      .bead_channels))
  where 19: read_fcs(.file_name = .file_name)
  where 20: eval_bare(expr, quo_get_env(quo))
  where 21: quasi_label(enquo(object), label, arg = "object")
  where 22 at testthat/test_read_fcs.R#75: expect_is(read_fcs(.file_name = .file_name), "data.frame")
  where 23: eval(code, test_env)
  where 24: eval(code, test_env)
  where 25: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 26: doTryCatch(return(expr), name, parentenv, handler)
  where 27: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 28: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 29: doTryCatch(return(expr), name, parentenv, handler)
  where 30: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 31: tryCatchList(expr, classes, parentenv, handlers)
  where 32: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 33: test_code(desc, code, env = parent.frame())
  where 34 at testthat/test_read_fcs.R#74: test_that("FACS files can be read and processed", {
      expect_is(read_fcs(.file_name = .file_name), "data.frame")
      expect_is(read_fcs(.file_name = .file_name, .filter = list(`FSC-A` = c(Inf, 
          5))), "data.frame")
      expect_is(read_fcs(.file_name = .file_name, .fsc_ssc = c("FSC-H", 
          "SSC-H")), "data.frame")
      expect_is(read_fcs(.file_name = .file_name, .bead_channels = c("FSC-H", 
          "SSC-H")), "data.frame")
      expect_error(read_fcs(.file_name = .file_name, .fsc_ssc = c("FSC-H", 
          " ")))
      expect_error(read_fcs(.file_name = .file_name, .fsc_ssc = c("FSC-H")))
      expect_error(read_fcs(.file_name = .file_name, .filter = c("FSC-H")))
  })
  where 35: eval(code, test_env)
  where 36: eval(code, test_env)
  where 37: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 38: doTryCatch(return(expr), name, parentenv, handler)
  where 39: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 40: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 41: doTryCatch(return(expr), name, parentenv, handler)
  where 42: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 43: tryCatchList(expr, classes, parentenv, handlers)
  where 44: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 45: test_code(NULL, exprs, env)
  where 46: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 47: force(code)
  where 48: doWithOneRestart(return(expr), restart)
  where 49: withOneRestart(expr, restarts[[1L]])
  where 50: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 51: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 52: FUN(X[[i]], ...)
  where 53: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 54: force(code)
  where 55: doWithOneRestart(return(expr), restart)
  where 56: withOneRestart(expr, restarts[[1L]])
  where 57: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 58: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 59: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 60: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 61: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 62: test_check("beadplexr")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (.x, .p) 
  {
      if ((class(.x) == "matrix") & is.numeric(.x)) {
          TRUE %in% (.p %in% colnames(.x))
      }
      else {
          FALSE
      }
  }
  <bytecode: 0x84be448>
  <environment: 0x3ee6d988>
   --- function search by body ---
   ----------- END OF FAILURE REPORT -------------- 
  -- 2. Error: FACS files can be read and processed (@test_read_fcs.R#75)  -------
  the condition has length > 1
  Backtrace:
    1. testthat::expect_is(read_fcs(.file_name = .file_name), "data.frame")
    4. beadplexr::read_fcs(.file_name = .file_name)
    5. flowCore::read.FCS(...)
   12. beadplexr:::transform_bead_channels(., .bead_channels = .bead_channels)
   13. beadplexr:::apply_compensation(., .compensation = .compensation)
   21. purrr::map_lgl(., .get_potential_comp_matrices, .p = ff_parameters)
   22. beadplexr:::.f(.x[[i]], ...)
  
   ----------- FAILURE REPORT -------------- 
   --- failure: the condition has length > 1 ---
   --- srcref --- 
  : 
   --- package (from environment) --- 
  beadplexr
   --- call from context --- 
  .f(.x[[i]], ...)
   --- call from argument --- 
  if ((class(.x) == "matrix") & is.numeric(.x)) {
      TRUE %in% (.p %in% colnames(.x))
  } else {
      FALSE
  }
   --- R stacktrace ---
  where 1: .f(.x[[i]], ...)
  where 2: purrr::map_lgl(., .get_potential_comp_matrices, .p = ff_parameters)
  where 3: function_list[[k]](value)
  where 4: withVisible(function_list[[k]](value))
  where 5: freduce(value, `_function_list`)
  where 6: `_fseq`(`_lhs`)
  where 7: eval(quote(`_fseq`(`_lhs`)), env, env)
  where 8: eval(quote(`_fseq`(`_lhs`)), env, env)
  where 9: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  where 10: ff_keywords %>% purrr::map_lgl(.get_potential_comp_matrices, 
      .p = ff_parameters)
  where 11: apply_compensation(., .compensation = .compensation)
  where 12: function_list[[i]](value)
  where 13: freduce(value, `_function_list`)
  where 14: `_fseq`(`_lhs`)
  where 15: eval(quote(`_fseq`(`_lhs`)), env, env)
  where 16: eval(quote(`_fseq`(`_lhs`)), env, env)
  where 17: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  where 18: flowCore::read.FCS(filename = .file_name, transformation = FALSE, 
      ...) %>% transform_bead_channels(.bead_channels = .bead_channels) %>% 
      apply_compensation(.compensation = .compensation) %>% remove_boundary_events(.channels = c(.fsc_ssc)) %>% 
      subset_channels(.filter = .filter) %>% as_data_frame_flow_frame(.channels = c(.fsc_ssc, 
      .bead_channels))
  where 19 at testthat/test_visualisations.R#5: read_fcs(.file_name = .file_name, .filter = list(`FSC-A` = c(200000L, 
      630000L), `SSC-A` = c(2e+05, 1000000L)))
  where 20: eval(code, test_env)
  where 21: eval(code, test_env)
  where 22: withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error)
  where 23: doTryCatch(return(expr), name, parentenv, handler)
  where 24: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  where 25: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  where 26: doTryCatch(return(expr), name, parentenv, handler)
  where 27: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 
      names[nh], parentenv, handlers[[nh]])
  where 28: tryCatchList(expr, classes, parentenv, handlers)
  where 29: tryCatch(withCallingHandlers({
      eval(code, test_env)
      if (!handled && !is.null(test)) {
          skip_empty()
      }
  }, expectation = handle_expectation, skip = handle_skip, warning = handle_warning, 
      message = handle_message, error = handle_error), error = handle_fatal, 
      skip = function(e) {
      })
  where 30: test_code(NULL, exprs, env)
  where 31: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  where 32: force(code)
  where 33: doWithOneRestart(return(expr), restart)
  where 34: withOneRestart(expr, restarts[[1L]])
  where 35: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 36: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter, 
      {
          reporter$start_file(basename(path))
          lister$start_file(basename(path))
          source_file(path, new.env(parent = env), chdir = TRUE, 
              wrap = wrap)
          reporter$.end_context()
          reporter$end_file()
      })
  where 37: FUN(X[[i]], ...)
  where 38: lapply(paths, test_file, env = env, reporter = current_reporter, 
      start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  where 39: force(code)
  where 40: doWithOneRestart(return(expr), restart)
  where 41: withOneRestart(expr, restarts[[1L]])
  where 42: withRestarts(testthat_abort_reporter = function() NULL, force(code))
  where 43: with_reporter(reporter = current_reporter, results <- lapply(paths, 
      test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE, 
      load_helpers = FALSE, wrap = wrap))
  where 44: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 45: test_dir(path = test_path, reporter = reporter, env = env, filter = filter, 
      ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 
      wrap = wrap)
  where 46: test_package_dir(package = package, test_path = test_path, filter = filter, 
      reporter = reporter, ..., stop_on_failure = stop_on_failure, 
      stop_on_warning = stop_on_warning, wrap = wrap)
  where 47: test_check("beadplexr")
  
   --- value of length: 2 type: logical ---
  [1]  TRUE FALSE
   --- function from context --- 
  function (.x, .p) 
  {
      if ((class(.x) == "matrix") & is.numeric(.x)) {
          TRUE %in% (.p %in% colnames(.x))
      }
      else {
          FALSE
      }
  }
  <bytecode: 0x84be448>
  <environment: 0x19089060>
   --- function search by body ---
   ----------- END OF FAILURE REPORT -------------- 
  -- 3. Error: (unknown) (@test_visualisations.R#5)  -----------------------------
  the condition has length > 1
  Backtrace:
    1. beadplexr::read_fcs(...)
    2. flowCore::read.FCS(...)
    9. beadplexr:::transform_bead_channels(., .bead_channels = .bead_channels)
   10. beadplexr:::apply_compensation(., .compensation = .compensation)
   18. purrr::map_lgl(., .get_potential_comp_matrices, .p = ff_parameters)
   19. beadplexr:::.f(.x[[i]], ...)
  
  == testthat results  ===========================================================
  [ OK: 312 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 3 ]
  1. Error: Compensation can be applied (@test_read_fcs.R#55) 
  2. Error: FACS files can be read and processed (@test_read_fcs.R#75) 
  3. Error: (unknown) (@test_visualisations.R#5) 
  
  Error: testthat unit tests failed
  Execution halted