skimrObjects within skimr are identified by a class, but they require additional
attributes and data columns for all operations to succeed. These checks help
ensure this. While they have some application externally, they are mostly
used internally.
has_type_column(object)has_variable_column(object)
has_skimr_attributes(object)
is_skim_df(object)
assert_is_skim_df(object)
is_skim_list(object)
assert_is_skim_list(object)
could_be_skim_df(object)
Any R object.
has_type_column: Does the object have the skim_type column?
has_variable_column: Does the object have the skim_variable column?
has_skimr_attributes: Does the object have the appropriate skimr attributes?
is_skim_df: Is the object a skim_df?
assert_is_skim_df: Stop if the object is not a skim_df.
is_skim_list: Is the object a skim_list?
assert_is_skim_list: Stop if the object is not a skim_list.
could_be_skim_df: Is this a data frame with skim_variable and
skim_type columns?
Most notably, a skim_df
has columns skim_type and skim_variable
has more than zero rows
And has the following special attributes
data_rows: n rows in the original data
data_cols: original number of columns
df_name: name of the original data frame
groups: if there were group variables
base_skimmers: names of functions applied to all skim types
skimmers_used: names of functions used to skim each type