View source: R/add-n-prop-miss.R
add_prop_miss | R Documentation |
It can be useful when doing data analysis to add the proportion of missing
data values into your dataframe. add_prop_miss
adds a column named
"prop_miss", which contains the proportion of missing values in that row.
You can specify the variables that you would like to show the missingness
for.
add_prop_miss(data, ..., label = "prop_miss")
data |
a dataframe |
... |
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
|
label |
character string of what you need to name variable |
a dataframe
bind_shadow()
add_any_miss()
add_label_missings()
add_label_shadow()
add_miss_cluster()
add_prop_miss()
add_shadow_shift()
cast_shadow()
airquality %>% add_prop_miss()
airquality %>% add_prop_miss(Solar.R, Ozone)
airquality %>% add_prop_miss(Solar.R, Ozone, label = "testing")
# this can be applied to model the proportion of missing data
# as in Tierney et al \doi{10.1136/bmjopen-2014-007450}
# see "Modelling missingness" in vignette "Getting Started with naniar"
# for details
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.