Description Usage Arguments Value See Also Examples
This function is designed to be like the built-in summary
function but include a few additional values.
If the input is not numeric, the built-in summary command is executed.
1 | oii.summary(x, extended = FALSE, warnings = FALSE)
|
x |
a numeric vector for which summary statistics should be generated. |
extended |
a logical value indicating whether additional statistics should be printed (see Value section). Defaults to FALSE stripped before the computation proceeds (defaults to TRUE). |
warnings |
a logical value indicating whether warnings should be shown (defaults to FALSE, no warnings). |
If x
is not numeric, the built-in summary command is executed.
If x
is numeric (that is, is.numeric(x)
returns TRUE), then a list with the following elements is returned:
cases |
The number of non-missing values in |
na |
The number of missing values in |
mean |
The mean value of |
sd |
The standard deviation for values in |
min |
The minimum/smallest value in |
max |
The maximum/largest value in |
This function also calculates the following statistics, but these are not printed by default unless extended is set to TRUE
var |
The variance of |
median |
The median value of |
p25 |
The 25th percentile of |
p75 |
The 75th percentile of |
skewness |
The skewness coefficient for |
kurtosis |
The kurtosis coefficient for |
summary
, min
, median
, mean
, max
, sd
,
is.na
, is.numeric
, skewness
, kurtosis
, var
1 2 3 4 5 6 7 8 | #Generate data from a normal distribution with mean 0 and sd 1
#store the result in a variable called tmp
tmp<-rnorm(500,mean=0,sd=1)
#Print the summary statistics about tmp
oii.summary(tmp)
#Print even more summary statistics about tmp
oii.summary(tmp,extended=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.