summarize_missing_values {psycCleaning}R Documentation

Count the number of missing values

Description

It counts the number of missing (i.e.,'NA') values in each column.

Usage

summarize_missing_values(
  data,
  cols = dplyr::everything(),
  group = NULL,
  verbose = TRUE,
  return_result = FALSE
)

Arguments

data

A data.frame or a data.frame extension (e.g. a tibble).

cols

Columns that need to be checked for missing values. See 'dplyr::dplyr_tidy_select' for available options.

group

character. count missing values by group.

verbose

default is 'TRUE'. Print the missing value data frame

return_result

default is 'FALSE'. Return 'data_frame' if set to yes

Value

An object of the same type as .data. that specified the number of NA values of the columns (only when 'return_result = TRUE')

Examples

df1 = data.frame(col1 = c(1,2,3),col2 = c(1,NA,3),col3 = c(1,2,NA))
summarize_missing_values(df1,everything())


[Package psycCleaning version 0.1.1 Index]