augment_data_helper {modeltests} | R Documentation |
Get copies of a dataset with various rowname behaviors
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
augment_data_helper(data, add_missing)
Arguments
data |
A data set as a |
add_missing |
Whether or not to set some values in |
Value
A list with three copies of data
:
-
tibble: the data in a
tibble::tibble()
. -
no_row: the data in a
data.frame()
without row names. -
row_nm: the data in a
data.frame
, with row names.
See Also
.row_names_info()
, rownames()
, tibble::rownames_to_column()