mystat: Calculate and display basic statistics for an object.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/mystat.R

Description

This function calculates the min, max, median, mean, standard deviation, skew and kurtosis for the specified object and displays the results in a semi-tabular form. An option is provided to set the number of digits displayed for the returned values. Note: see the help pages in this package for theskew and thekurt for information on those implementations.

Usage

1
mystat(x, numdig = 3, na.rm = TRUE, printit = TRUE)

Arguments

x

A vector or vectorizable object.

numdig

How many digits to the right of the decimal point to display (when printit is TRUE.

na.rm

Does the user desire NA values to be removed. Rare is the need to set this to FALSE.

printit

Set to TRUE to see the results, nicely formatted, in the console.

Value

A data frame with scalar elements matching their names:

min

minimum

max

maximum

mean

mean value

median

median

sdev

standard deviation

skew

skew

kurtosis

kurtosis

Author(s)

Carl Witthoft, carl@witthoft.com

See Also

theskew , thekurt

Examples

1
2
3
x <- runif(100)
mystat(x)
mystat(x,numdig=6)

cgwtools documentation built on May 30, 2017, 1:47 a.m.

Search within the cgwtools package
Search all R packages, documentation and source code