mystat | R Documentation |
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.
mystat(x, numdig = 3, na.rm = TRUE, printit = TRUE)
x |
A vector or vectorizable object. |
numdig |
How many digits to the right of the decimal point to display (when |
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. |
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 |
Carl Witthoft, carl@witthoft.com
theskew
, thekurt
x <- runif(100)
mystat(x)
mystat(x,numdig=6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.