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 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.
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 NA
s to the end of data. This ensures that every column
has missing data. Defaults to FALSE
.