Description Usage Arguments Value See Also Examples

Function like cut but left endpoints are inclusive and labels are of
the form `[lower, upper)`

, except that last interval is `[lower,upper]`

.
If cuts are given, will by default make sure that cuts include entire
range of `x`

.
Also, if cuts are not given, will cut `x`

into quantile groups
(`g`

given) or groups
with a given minimum number of observations (`m`

). Whereas cut creates a
category object, `cut2`

creates a factor object.

1 2 |

`x` |
numeric vector to classify into intervals |

`cuts` |
cut points |

`m` |
desired minimum number of observations in a group. The algorithm does
not guarantee that all groups will have at least |

`g` |
number of quantile groups |

`levels.mean` |
set to |

`digits` |
number of significant digits to use in constructing levels. Default is 3
(5 if |

`minmax` |
if cuts is specified but |

`oneval` |
if an interval contains only one unique value, the interval will be
labeled with the formatted version of that value instead of the
interval endpoints, unless |

`onlycuts` |
set to |

`formatfun` |
formatting function, supports formula notation (if |

`...` |
additional arguments passed to |

a factor variable with levels of the form `[a,b)`

or formatted means
(character strings) unless `onlycuts`

is `TRUE`

in which case
a numeric vector is returned

1 2 3 4 5 6 |

harrelfe/Hmisc documentation built on Oct. 3, 2019, 9:34 p.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.