Description Usage Arguments Details Value Examples

View source: R/weighted_ntile.R

Weighted quantiles

1 |

`vector` |
The vector for which quantiles are desired. |

`weights` |
The weights associated with the vector. None should be |

`n` |
The number of quantiles desired. |

With a short-length vector, or with weights of a high variance, the results may be unexpected.

A vector of integers corresponding to the ntiles. (As in `dplyr::ntile`

.)

1 2 | ```
weighted_ntile(1:10, n = 5)
weighted_ntile(1:10, weights = c(rep(4, 5), rep(1, 5)), n = 5)
``` |

grattan documentation built on May 29, 2018, 1:06 a.m.

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.