ezPrecis: Obtain a structure summary of a given data frame

Description Usage Arguments Details Value Author(s) See Also Examples

Description

This function provides a structure summary of a given data frame.

Usage

1
2
3
4
ezPrecis(
    data
    , transpose = TRUE
)

Arguments

data

Data frame containing the data to be analyzed.

transpose

Logical. If TRUE (default), triggers tranposition of the resulting summary data frame (useful when there are many columns in the original data frame, leading the untransposed summary data frame to wrap).

Details

This function was inspired by the whatis() function from the YaleToolkit package.

Value

A data frame containing the descriptive information about each column in the specified data frame:

type

This row indicates the type of data R thinks is in each column. Recall that when R imports data to a data frame, each column is given a label that indicates what type of information is in that column (character, numeric, or a factor data).

missing

This row reports a count of the number of missing values in each column.

unique

This row reports a count of the number of unique values in each column.

min

This row reports the minimum value found in each column. If the column data is numeric this is straightforward. If the column data is factored, the first level is reported. If the column data is character, the alphabetically first string is reported.

max

This row reports the maximum value found in each column. If the column data is numeric this is straightforward. If the column data is factored, the last level is reported. If the column data is character, the alphabetically last string is reported.

Author(s)

Michael A. Lawrence mike.lwrnc@gmail.com
Visit the ez development site at http://github.com/mike-lawrence/ez
for the bug/issue tracker and the link to the mailing list.

See Also

ezDesign

Examples

1
2
3
4
5
6
#Read in the ANT2 data (see ?ANT2).
data(ANT2)
head(ANT2)

#Show a summary of the ANT2 data.
ezPrecis(ANT2)

mike-lawrence/ez documentation built on May 22, 2019, 10:51 p.m.