Learn R Programming

descriptr (version 0.5.2)

ds_screener: Screen data

Description

Screen data and return details such as variable names, class, levels and missing values. plot.ds_screener() creates bar plots to visualize of missing observations for each variable in a data set.

Usage

ds_screener(data)

# S3 method for ds_screener plot(x, ...)

Arguments

data

A tibble or a data.frame.

x

An object of class ds_screener.

...

Further arguments to be passed to or from methods.

Value

ds_screener() returns an object of class "ds_screener". An object of class "ds_screener" is a list containing the following components:

Rows

Number of rows in the data frame.

Columns

Number of columns in the data frame.

Variables

Names of the variables in the data frame.

Types

Class of the variables in the data frame.

Count

Length of the variables in the data frame.

nlevels

Number of levels of a factor variable.

levels

Levels of factor variables in the data frame.

Missing

Number of missing observations in each variable.

MissingPer

Percent of missing observations in each variable.

MissingTotal

Total number of missing observations in the data frame.

MissingTotPer

Total percent of missing observations in the data frame.

MissingRows

Total number of rows with missing observations in the data frame.

MissingCols

Total number of columns with missing observations in the data frame.

Examples

Run this code
# NOT RUN {
# screen data
ds_screener(mtcarz)
ds_screener(airquality)

# plot
x <- ds_screener(airquality)
plot(x)

# }

Run the code above in your browser using DataLab