discretize_variable: Discretize Continuous Variable

Description Usage Arguments Value

Description

Converts a data.table column from continuous to a discrete factor

Usage

1
discretize_variable(data, variable, num_cats, breakpoints = NULL)

Arguments

data

data.table, containing the column to change

variable

character, the name of the column to change

num_cats

integer, the number of bins to generate

breakpoints

numeric vector, the breakpoints to use. If NULL, these will be quantiles.

Value

the updated data.table, modified in place


lurui0421/TMLE-for-causal-inference- documentation built on July 4, 2019, 1:03 p.m.