gpa_discretize: Convert GPA Values into Discrete Ranges

Description Usage Arguments Details Value Author(s) See Also

View source: R/panthr.r

Description

gpa_discretize optimizes base R function cut specifically for values in *GPA fields, e.g. GRAD_GPA, by streamlining binning into tenths, quarters, thirds, and halves, as well as cleaning bin labels.

Usage

1
gpa_discretize(gpa, range = "thirds", right = FALSE)

Arguments

gpa

A scalar or vector of length n and class numeric containing one or more GPA values.

range

A single string, in quotations, indicating the range of cut points. Possible values include "tenths", "quarters", "thirds", and "halves". Defaults to range = "thirds".

right

A logical value indicating if ranges should be closed on the right and open on the left (TRUE). Defaults to right = TRUE.

Details

Values passed to argument gpa = which exceed 4.33 are coerced to NA (missing) values and a warning message is thrown.

Value

A scalar or vector of clean character strings, according to the parameter passed to argument range =, comprised of the lower and upper bounds in which the value passed to gpa = falls. Missing values are preserved.

Author(s)

Jamison R. Crawford, Institutional Research Associate, Georgia State University

See Also

cut, gsub


jamisoncrawford/panthr documentation built on March 9, 2020, 6:18 p.m.