explainer.numeric: Explain method for numeric data types

Description Usage Arguments Details Value Examples

View source: R/explainer.R

Description

This is a explainer method for numeric vector.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## S3 method for class 'numeric'
explainer(
  X,
  xname = NULL,
  include.numeric = NULL,
  round.digit = 2,
  quant.seq = seq(0, 1, 0.2),
  trim = 0.05,
  ...
)

Arguments

X

a numeric (or integer) data type

xname

a placeholder for variable name

include.numeric

a vector having strings which is also required along with the default output. Can have values:

  • trimmed.means for printing the trimmed mean after removing trim fraction of data from each side of x. trim can be passed as an parameter

  • skewness for printing the skewness of the data. Use ?skreness for more information

  • kurtosis for printing the kurtosis of the data. Use ?kurtosis for more information

round.digit

number of decimal places required in the output.

quant.seq

vector of fractions (0 to 1) for which the quantiles are required 0.5 means median, 0 means smallest observation and 1 means largest observation

trim

the fraction (0 to 0.5) of observations to be trimmed from each end of x before the mean is computed. Values of trim outside that range are taken as the nearest endpoint. This only works if include.numeric has a string 'trimmed.means'

...

other parameters required

Details

This method removes all the missing values in x before computing the summaries.

Value

Prints the following information on console:

Examples

1
2
3
explainer(mtcars$mpg)
explainer(mtcars$mpg, include.numeric = c('trimmed.means', 'skewness',
'kurtosis'), round.digit = 1, quant.seq = seq(0,1,0.1), trim = 0.05)

analyzer documentation built on July 1, 2020, 10:02 p.m.