check_augment_data_specification: Check that augment behavior is consistent for dataframes and...

Description Usage Arguments Value

View source: R/check_augment_data_specification.R

Description

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

Uses augment_data_helper() to create copies of the same dataset as a tibble, data frame and dataframe with rownames. When add_missing = TRUE these datasets have missing values along the diagonal, and one row of entirely missing values. Once the datasets have been generated, tests that:

Additional tests when test_newdata = TRUE:

Usage

1
check_augment_data_specification(aug, model, data, add_missing, test_newdata)

Arguments

aug

An augment method. For example, augment.betareg.

model

A fit model object to call the augment method on.

data

A data frame or tibble to use when testing aug.

add_missing

Logical indicating whether or not missing data should be introduced into the datasets generated with augment_data_helper(). This missing data is only used to test the newdata argument, not the data argument.

test_newdata

Logical indicating whether the newdata argument behavior should be tested instead of the data argument behavior.

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 Jan. 16, 2021, 5:38 p.m.