| explainer.numeric {analyzer} | R Documentation |
Explain method for numeric data types
Description
This is a explainer method for numeric vector.
Usage
## 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:
|
round.digit |
number of decimal places required in the output. |
quant.seq |
vector of fractions (0 to 1) for which the quantiles are
required |
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 |
... |
other parameters required |
Details
This method removes all the missing values in x before computing the
summaries.
Value
Prints the following information on console:
vector name
type
number of distinct values
number of missing values
mean
sd (standard deviation)
median
quantiles based on
quant.seqparameterother information based on
include.numerica box plot (only if number distinct numbers are > 2). If counts of all the factor levels are less than half of length of
x, then the histogram is scaled with maximum of 50?consoleBoxplotfor how to read the table and histogram)a frequency table and histogram (only if number of distinct numbers are < 11) (look at
?freqTablefor how to read the table and histogram)
Examples
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)