Winsorize a numeric vector

1 2 3 4 5 |

`x` |
A vector of values |

`probs` |
A vector of probabilities that can be used instead of cutpoints. Quantiles are computed as the inverse of the empirical distribution function (type = 1) |

`cutpoints` |
Cutpoints under and above which are defined outliers. Default is (median - five times interquartile range, median + five times interquartile range). Compared to bottom and top percentile, this takes into account the whole distribution of the vector. |

`replace` |
Values by which outliers are replaced. Default to cutpoints. A frequent alternative is NA. |

`verbose` |
Boolean. Should the percentage of replaced values printed? |

1 2 3 4 5 6 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.