ggmissing              package:ggplot2              R Documentation

_M_i_s_s_i_n_g _v_a_l_u_e_s _p_l_o_t

_D_e_s_c_r_i_p_t_i_o_n:

     Create a plot to illustrate patterns of missing values

_U_s_a_g_e:

     ggmissing(data, avoid="stack", order=TRUE, missing.only = TRUE)

_A_r_g_u_m_e_n_t_s:

    data: data.frame

   avoid: whether missings should be stacked or dodged, see 'geom_bar'
          for more details

   order: whether variable should be ordered by number of missings

missing.only: whether only variables containing some missing values
          should be shown

_D_e_t_a_i_l_s:

     The missing values plot is a useful tool to get a rapid overview
     of the number of missings in a dataset.  It's strength is much
     more apparent when used with interactive graphics, as you can see
     in Mondrian (<URL: http://rosuda.org/mondrian>) where this plot
     was copied from.

_A_u_t_h_o_r(_s):

     Hadley Wickham <h.wickham@gmail.com>

_S_e_e _A_l_s_o:

     'ggstructure', 'ggorder'

_E_x_a_m_p_l_e_s:

     mmissing <- movies
     mmissing[sample(nrow(movies), 1000), sample(ncol(movies), 5)] <- NA
     ggmissing(mmissing)
     ggmissing(mmissing, order=FALSE, missing.only = FALSE)
     ggmissing(mmissing, avoid="dodge") + scale_y_sqrt()
     ggmissing(mmissing) + scale_y_log10(limits=c(1, NA))

