This adds a column named "any_miss" (by default) that describes whether
there are any missings in all of the variables (default), or whether any
of the specified columns, specified using variables names or dplyr verbs,
starts_with
, contains
, ends_with
, etc. By default the added column
will be called "any_miss_all", if no variables are specified, otherwise,
if variables are specified, the label will be "any_miss_vars" to indicate
that not all variables have been used to create the labels.
add_any_miss(
data,
...,
label = "any_miss",
missing = "missing",
complete = "complete"
)
data.frame with data and the column labelling whether that row (for those variables) has any missing values - indicated by "missing" and "complete".
data.frame
Variable names to use instead of the whole dataset. By default this
looks at the whole dataset. Otherwise, this is one or more unquoted
expressions separated by commas. These also respect the dplyr verbs
starts_with
, contains
, ends_with
, etc. By default will add "_all" to
the label if left blank, otherwise will add "_vars" to distinguish that it
has not been used on all of the variables.
label for the column, defaults to "any_miss". By default if no additional variables are listed the label col is "any_miss_all", otherwise it is "any_miss_vars", if variables are specified.
character a label for when values are missing - defaults to "missing"
character character a label for when values are complete - defaults to "complete"
By default the
prefix "any_miss" is used, but this can be changed in the label
argument.
bind_shadow()
add_any_miss()
add_label_missings()
add_label_shadow()
add_miss_cluster()
add_n_miss()
add_prop_miss()
add_shadow_shift()
cast_shadow()
airquality %>% add_any_miss()
airquality %>% add_any_miss(Ozone, Solar.R)
Run the code above in your browser using DataLab