CommencerCommencer gratuitement

Your first missing data visualizations

It can be difficult to get a handle on where the missing values are in your data, and here is where visualization can really help.

The function vis_miss() creates an overview visualization of the missingness in the data. It also has options to cluster rows based on missingness, using cluster = TRUE; as well as options for sorting the columns, from most missing to least missing (sort_miss = TRUE).

Cet exercice fait partie du cours

Dealing With Missing Data in R

Afficher le cours

Instructions

Using the riskfactors dataset from naniar:

  • Use vis_miss() to visualize the missingness in the data.
  • Use vis_miss() with cluster = TRUE to explore some clusters of missingness.
  • Use vis_miss() and sort the missings with sort_miss to arrange the columns by missingness.

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Visualize all of the missingness in the `riskfactors`  dataset
vis_miss(___)

# Visualize and cluster all of the missingness in the `riskfactors` dataset
vis_miss(___, ___ = TRUE)

# visualize and sort the columns by missingness in the `riskfactors` dataset
vis_miss(___, ___ = TRUE)
Modifier et exécuter le code