DataSummary: DataSummary

Description Usage Arguments Details Author(s) Examples

Description

function gives summary of the dataset.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
DataSummary(data,missing=list(NA,NaN,Inf,-Inf),wt=NULL,entropy=FALSE,
entropy_method="emp",sparkline=FALSE)

## S3 method for class 'data.frame'
DataSummary(data, missing = list(NA, NaN, Inf, -Inf),
  wt = NULL, entropy = FALSE, entropy_method = "emp", sparkline = FALSE)

## S3 method for class 'data.table'
DataSummary(data, missing = list(NA, NaN, Inf, -Inf),
  wt = NULL, entropy = FALSE, entropy_method = "emp", sparkline = FALSE)

Arguments

data

This could be data frame, a vector, matrix or data.table.

missing

list of possible missing values.

wt

For a sampled dataset, you may want to specify the wieght for those stats calcualted. It can be a character which is a column name in the dataset provided, or integer (numeric) weights vector.

entropy

logical. whether to include entropy as part of output. It will take quite a long time.

entropy_method

The name of the entropy estimator. The 'infotheo' package implements four estimators : "emp", "mm", "shrink", "sg" (default:"emp").

sparkline

logical. If true, a string of level percentage will be generated, which can be used later in 'shiny' app with 'sparkline' package.

Details

This function provides a data summary including min, max, number of unique values and number if missing values. The min and max will ignore missing value in the data. As for the mean value, if it is character variable the mode (most frequency level) will be recorded.

Author(s)

Sixiang Hu

Examples

1
DataSummary(mtcars,missing=list(NA,NaN,Inf,-Inf,".","Unknown",-1))

SixiangHu/DataMan documentation built on May 9, 2019, 1:48 p.m.