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


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.


augment_data_helper(data, add_missing)



A data set as a data.frame or tibble.


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.


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.