Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

contents

Basic summary of the data


Description

Takes in a data and returns summary of the data

Usage

contents(data)

Arguments

data

a data.frame or data.table

Details

This function helps when one wants to get a quick snapshot of the data such as class, distinct values, missing values and sample value of the variables.

It works for both 'data.frame' and 'data.table' but the output will be a 'data.frame' only.

Value

a data.frame that contains variable, class, distinct values, missing values, percentage of missing value and sample value

Author(s)

Akash Jain

See Also

Examples

# A data frame
df <- data.frame(x = c(1, 2, 3, 4, NA),
                 y = c('a', 'b', 'c', 'd', 'e'),
                 z = c(1, 1, 0, 0, 1))

# Summary of the data
dfContents <- contents(data = df)

StatMeasures

Easy Data Manipulation, Data Quality and Statistical Checks

v1.0
GPL-2
Authors
Akash Jain
Initial release
2015-03-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.