augment_data_helper: Get copies of a dataset with various rowname behaviors

Description Usage Arguments Value See Also

View source: R/augment_data_helper.R

Description

Helper function for check_augment_data_specification(). There should be no need to ever use this directly in tests. Takes a dataset and returns a list with three copies of the dataset. Optionally introduces NA values into the dataset. Useful for checking that tibbles, data frames, and data frames with rownames are treated equivalently.

Usage

1
augment_data_helper(data, add_missing)

Arguments

data

A data set as a data.frame or tibble.

add_missing

Whether or not to set some values in data to NA. When TRUE sets the diagonal elements of data to NA and adds a row of all NAs to the end of data. This ensures that every column has missing data. Defaults to FALSE.

Value

A list with three copies of data:

See Also

.row_names_info(), rownames(), tibble::rownames_to_column()


modeltests documentation built on Jan. 16, 2021, 5:38 p.m.