Running ‘testthat.R’ [17s/23s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(vqtl)
  > 
  > test_check("vqtl")
  ── 1. Error: mean_var_sample_plot (@test-4-plots.R#76)  ────────────────────────
  could not find function "n"
  1: expect_is(object = mean_var_plot_model_free(cross = test.cross, phenotype.name = "phenotype1", 
         grouping.factor.names = c("sex", "D3M3")), class = "ggplot") at testthat/test-4-plots.R:76
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: mean_var_plot_model_free(cross = test.cross, phenotype.name = "phenotype1", grouping.factor.names = c("sex", 
         "D3M3"))
  5: plotting.df %>% dplyr::group_by_(.dots = grouping.factor.names) %>% dplyr::summarise_(mean = lazyeval::interp(~mean(var, 
         na.rm = TRUE), var = as.name(phenotype.name)), sd = lazyeval::interp(~sd(var, 
         na.rm = TRUE), var = as.name(phenotype.name)), mean.se = quote(sd/sqrt(n())), 
         sd.se = quote(sqrt(2) * sd^2/sqrt(n() - 1))) %>% stats::na.omit() %>% ggplot2::ggplot(mapping = ggplot2::aes(x = mean, 
         y = sd))
  6: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  7: eval(quote(`_fseq`(`_lhs`)), env, env)
  8: eval(quote(`_fseq`(`_lhs`)), env, env)
  9: `_fseq`(`_lhs`)
  10: freduce(value, `_function_list`)
  11: function_list[[i]](value)
  12: dplyr::summarise_(., mean = lazyeval::interp(~mean(var, na.rm = TRUE), var = as.name(phenotype.name)), 
         sd = lazyeval::interp(~sd(var, na.rm = TRUE), var = as.name(phenotype.name)), 
         mean.se = quote(sd/sqrt(n())), sd.se = quote(sqrt(2) * sd^2/sqrt(n() - 1)))
  13: summarise_.tbl_df(., mean = lazyeval::interp(~mean(var, na.rm = TRUE), var = as.name(phenotype.name)), 
         sd = lazyeval::interp(~sd(var, na.rm = TRUE), var = as.name(phenotype.name)), 
         mean.se = quote(sd/sqrt(n())), sd.se = quote(sqrt(2) * sd^2/sqrt(n() - 1)))
  14: summarise_impl(.data, dots, environment(), caller_env())
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 118 SKIPPED: 2 FAILED: 1
  1. Error: mean_var_sample_plot (@test-4-plots.R#76) 
  
  Error: testthat unit tests failed
  Execution halted