clip.data: Clip data at quantiles to remove outliers.

Description Usage Arguments Value Examples

View source: R/rglactions.R

Description

Set all data values outside the given quantile range to the border values. This is usefull to properly visualize morphometry data that includes outliers. These outliers negatively affect the colormap, as all the non-outlier values become hard to distinguish. This function can be used to filter the data before plotting it.

Usage

1
clip.data(data, lower = 0.05, upper = 0.95)

Arguments

data,

numeric vector. The input data. Can also be a hemi list.

lower,

numeric. The probability for the lower quantile, defaults to '0.05'.

upper,

numeric. The probability for the upper quantile, defaults to '0.95'.

Value

numeric vector. The output data.

Examples

1
2
   full_data = rnorm(50, 3, 1);
   clipped = clip.data(full_data);

neuroconductor/fsbrain documentation built on Sept. 16, 2020, 2:30 p.m.