quant_create: Quantile Creation Function

Description Usage Arguments Value Examples

Description

A simple function that allows you to create evenly spaced quantiles for a continuous varible.

Usage

1
quant_create(continuous_var, n = 3, dt = NULL)

Arguments

continuous_var

If dt is specified, then this should be a character variable specifying which variable to split on. If dt is null then this should be a continuous numeric vector.

n

The number of evenly spaced quantiles to create. Default value is tertile.

dt

Data.fame object in R, does not need to be specified if supplying a continuous vector

Value

List containing the vector of quantile values and the continuous cutpoints used.

Examples

1
2
3
data("iris")
quant_obj <- quant_create(iris$Sepal.Length)
table(quant_obj$quant); quant_obj$cut

williazo/gps.continuousnav documentation built on May 8, 2019, 6:57 p.m.