Description Usage Arguments Details Value Author(s) See Also Examples
This function will calculate the median and range of a distribution, possibly for each level of a grouping variable.
1 2 3 4 5 6 7 |
x |
The numeric vector to summarize. |
formula |
A formula with the numeric vector on the left hand side and one or more grouping variables/factors on the right hand side. |
data |
A |
subset |
An optional vector specifying a subset of observations to be used for the calculations. |
overall |
If |
overall.label |
If |
na.rm |
A logical value indicating whether |
na.action |
A function which indicates what should happen when the data contain
|
... |
Arguments passed to |
With small sample sizes, some analysts find that the interquartile range is not very helpful and prefer to report the median and the range.
For the formula method, multiple variables on the right hand side of
the formula are combined to form the unique levels by which the
numeric vector is summarized. The underlying code is borrowed from
boxplot
so whatever works there will work here.
An intercept-only model does not work currently but that would be useful.
The ... argument can be used to specify which of nine quantile algorithms is used.
The default method returns a numeric vector of length 3 showing the median, minimum, and maximum.
The formula method returns a numeric matrix with rows reprsenting the median, minimum, and maximum and columns representing the factor levels.
For both methods, the result is of class "medR"
but
it will probably change to to class "sumry"
or something
similar so that functions like meanSD
return
an object of the same class.
Stephen Weigand Weigand.Stephen@mayo.edu
medIQR
, meanSD
, summary
,
quantile
, IQR
, fivenum
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.