qmean | R Documentation |
This function subsets a given vector of numbers according to the quantiles specified with intervalsize and computes the mean of the subset. The intervalsize specifies the percentage of the data that should be used to compute the mean. The quantiles are defined as half the intervalsize left and right of 50%. Therefore the distribution of the subset will be centered at the median of the data vector. The interval can be also centered at other points of the distribution.
qmean(vector, intervalsize = 0.95, intervalcenter = 0.5, na.rm = F, inf.rm = F)
vector |
Some vector with numbers. |
intervalsize |
The amount of the original data that should be passed to mean. It may take values between 0 and 1. |
intervalcenter |
The center point of the interval specified by intervalsize. The default is the median at 0.5. It may take values between 0 and 1. |
na.rm |
Boolean value. Remove NA values from data vector before processing it? |
inf.rm |
Boolean value. Remove Inf values from data vector before processing it? |
For example: The intervalsize 0.5 will cause the function to compute the 25%- and the 75%-quantile and get the mean of all the values in the data vector, that are between these quantiles.
The mean of the data without considering the outliner.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.