check_single_augment_output: Check the output of an augment method

View source: R/check_single_augment_output.R

check_single_augment_outputR Documentation

Check the output of an augment method

Description

Call this function to perform tests. If a tests fails, an informative error will be thrown. Otherwise silent.

Test when strict = FALSE:

  • au passes check_tibble().

  • All column names present in passed_data are also present in au.

Additional tests when strict = TRUE:

  • If passed_data has rownames other than simple row numbers (i.e. paste(1:5)), au contains a column called .rownames.

Usage

check_single_augment_output(au, passed_data, model = NULL, strict = TRUE)

Arguments

au

Output from a call to augment().

passed_data

Whichever of data or newdata was passed to augment. Should be a data frame or tibble.

strict

Logical indicating whether the strict version of tests should be used. Defaults to TRUE.

Value

An invisible NULL. This function should be called for side effects, not return values.


modeltests documentation built on May 29, 2024, 4:57 a.m.