ustat: provides function computing usual statistics.

Description Usage Arguments Details Value Examples

View source: R/f1.rbsb2.code.r

Description

This function is aimed to be an argument for the function msdistri. It returns a list of two parallel components: (1) a vector a names of each statistics and (2) a list of functions computing the statistics.

Usage

1
ustat(wh="all")

Arguments

wh

Defines which statistics must be used. The different possibilities are:
"all" for all of the following;
"n" for number of non missing values;
"m" for the mean;
"s" for the standard deviation;
"M" for the median;
"i" for the minimum;
"a" for the maximum;
"2" for the 0.025 and 0.975 quantiles and their difference;
"5" for the 0.05 and 0.95 quantiles and their difference;
"i" for the 0.25 and 0.75 quantiles and their difference.

Details

The statistics are computed after removing the NA values.
See the code for more details.

Value

A named list, each component being a function taking a vector of numeric values as input and returning the corresponding statistics.

Examples

1
2
 rbsb3k("RESET"); # For R checking compliance
 print(ustat("n"));

rbsb documentation built on May 31, 2017, 1:45 a.m.