Error in `sqrt(new_n)`: non-numeric argument to mathematical function

n_mat <- matrix(rnorm(n * k, mean = 5, sd = 10), ncol = k)
pvals <- apply(n_mat, 2, function(x) t.test(x)$p.value)
n_mat <- matrix(rnorm(n * k, mean = 5, sd = 2.5), ncol = k)
res_bll1 <- suppressWarnings(findn(fun = fun_ttest1, targ = 0.8, start = 100))
det_bll11 <- print(res_bll1, details = "low", invisible = TRUE)
low_cl <- stats::pnorm(pred_bll$pred - stats::qnorm(1 - (res_bll1$level /
det_bll12 <- print(res_bll1, details = "high", max_n = 10, invisible = TRUE)
det_bll13 <- print(res_bll1, details = "high", invisible = TRUE)
res_bll2 <- suppressWarnings(findn(fun = fun_ttest2, targ = 0.8, start = 100,
det_bll2 <- print(res_bll2, details = "high", invisible = TRUE)
expect_equal(sum(det_bll13$Details$Rating == "Too Low"), 3)
det_bll13$Details$Rating == "Too Low")])), 0.8)