Running ‘testthat.R’ [5s/5s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(janitor)
  > 
  > test_check("janitor")
  
  Attaching package: 'dplyr'
  
  The following object is masked from 'package:testthat':
  
      matches
  
  The following objects are masked from 'package:stats':
  
      filter, lag
  
  The following objects are masked from 'package:base':
  
      intersect, setdiff, setequal, union
  
  1. Error: bad input variable name is preserved (@test-crosstab.R#108) ----------
  undefined columns selected
  1: expect_equal(mtcars %>% mutate(`bad name` = cyl) %>% crosstab(`bad name`, gear) %>% 
         names %>% .[[1]], "bad name") at testthat/test-crosstab.R:108
  2: compare(object, expected, ...)
  3: mtcars %>% mutate(`bad name` = cyl) %>% crosstab(`bad name`, gear) %>% names %>% 
         .[[1]]
  4: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  5: eval(quote(`_fseq`(`_lhs`)), env, env)
  6: eval(quote(`_fseq`(`_lhs`)), env, env)
  7: `_fseq`(`_lhs`)
  8: freduce(value, `_function_list`)
  9: function_list[[i]](value)
  10: crosstab(., `bad name`, gear)
  11: crosstab.data.frame(., `bad name`, gear)
  12: .data[, deparse(columns[[1]])]
  13: `[.data.frame`(.data, , deparse(columns[[1]]))
  14: stop("undefined columns selected")
  
  2. Error: works on variables with irregular names (@test-get-dupes.R#34) -------
  These variables do not match column names in .: `bad name!`
  1: expect_equal(badname_df %>% get_dupes(`bad name!`, cyl) %>% dim, c(10, 13)) at testthat/test-get-dupes.R:34
  2: compare(object, expected, ...)
  3: badname_df %>% get_dupes(`bad name!`, cyl) %>% dim
  4: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  5: eval(quote(`_fseq`(`_lhs`)), env, env)
  6: eval(quote(`_fseq`(`_lhs`)), env, env)
  7: `_fseq`(`_lhs`)
  8: freduce(value, `_function_list`)
  9: function_list[[i]](value)
  10: get_dupes(., `bad name!`, cyl)
  11: check_vars_in_df(dat, df_name, unlist(var_names))
  12: stop(paste0(paste0("These variables do not match column names in ", dat_name, ": "), 
         paste(names_vec[!in_df], collapse = ", ")))
  
  3. Error: bad input variable name is preserved (@test-tabyl.R#100) -------------
  undefined columns selected
  1: expect_equal(mtcars %>% mutate(`bad name` = cyl) %>% tabyl(`bad name`) %>% names %>% 
         .[[1]], "bad name") at testthat/test-tabyl.R:100
  2: compare(object, expected, ...)
  3: mtcars %>% mutate(`bad name` = cyl) %>% tabyl(`bad name`) %>% names %>% .[[1]]
  4: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  5: eval(quote(`_fseq`(`_lhs`)), env, env)
  6: eval(quote(`_fseq`(`_lhs`)), env, env)
  7: `_fseq`(`_lhs`)
  8: freduce(value, `_function_list`)
  9: function_list[[i]](value)
  10: tabyl(., `bad name`)
  11: tabyl.data.frame(., `bad name`)
  12: .data[, deparse(columns[[1]])]
  13: `[.data.frame`(.data, , deparse(columns[[1]]))
  14: stop("undefined columns selected")
  
  testthat results ================================================================
  OK: 226 SKIPPED: 0 FAILED: 3
  1. Error: bad input variable name is preserved (@test-crosstab.R#108) 
  2. Error: works on variables with irregular names (@test-get-dupes.R#34) 
  3. Error: bad input variable name is preserved (@test-tabyl.R#100) 
  
  Error: testthat unit tests failed
  Execution halted