R: Cut a variable

qcut {timereg} | R Documentation

## Cut a variable

### Description

Calls the cut function to cut variables on data frame.

### Usage

    qcut(x, cuts = 4, breaks = NULL, ...)

### Arguments

`x` | variable to cut
`cuts` | number of groups, 4 gives quartiles
`breaks` | can also give breaks
`...` | other argument for cut function of R

### Author(s)

Thomas Scheike

### Examples

    data(sTRACE)
    gx <- qcut(sTRACE$age)
    table(gx)

[Package timereg version 1.9.4 Index]