check_tibble: Check the output of a tidying method

View source: R/check_tibble.R

check_tibbleR Documentation

Check the output of a tidying method

Description

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

Tests when strict = FALSE:

  • output is a tibble.

Additional tests when strict = TRUE:

  • columns are listed in the column_glossary.

Usage

check_tibble(output, method, columns = colnames(output), strict = TRUE)

Arguments

output

Object returned from tidy(), augment() or glance().

method

One of "tidy", "augment" or "glance". Determines which set of column name checks are applied.

columns

The names of the columns in the output data frame. Defaults to the column names of output. Useful when checking augment() when you only want to check the new columns in the data frame, as opposed to all columns.

strict

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

Details

Do not call directly. Helper function used by check_tidy_output(), check_glance_outputs() and check_augment_function().

Value

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


alexpghayes/modeltests documentation built on March 7, 2024, 11 p.m.