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))

