Add a column that tells us which "missingness cluster" a row belongs to
A way to extract the cluster of missingness that a group belongs to.
For example, if you use vis_miss(airquality, cluster = TRUE)
, you can
see some clustering in the data, but you do not have a way to identify
the cluster. Future work will incorporate the seriation
package to
allow for better control over the clustering from the user.
add_miss_cluster(data, cluster_method = "mcquitty", n_clusters = 2)
data |
a dataframe |
cluster_method |
character vector of the agglomeration method to use,
the default is "mcquitty". Options are taken from |
n_clusters |
numeric the number of clusters you expect. Defaults to 2. |
add_miss_cluster(airquality) add_miss_cluster(airquality, n_clusters = 3) add_miss_cluster(airquality, cluster_method = "ward.D", n_clusters = 3)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.