Nothing
test_that("added variable plot requires at least two predictors (audit F10)", {
expect_error(
ols_plot_added_variable(lm(mpg ~ disp, data = mtcars), print_plot = FALSE),
"at least two predictors"
)
expect_error(
ols_plot_added_variable(lm(mpg ~ 1, data = mtcars), print_plot = FALSE),
"at least two predictors"
)
})
test_that("added variable plot returns one plot per predictor", {
p <- ols_plot_added_variable(lm(mpg ~ disp + hp + wt, data = mtcars), print_plot = FALSE)
expect_length(p, 3)
expect_s3_class(p[[1]], "ggplot")
})
test_that("ols_prep_avplot_data() gives a clear error for non-model input", {
expect_error(
ols_prep_avplot_data(1),
"`model` must be an object of class `lm`",
fixed = TRUE
)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.