gpa_round: Round GPA Values Directionally

Description Usage Arguments Value Author(s) See Also

View source: R/panthr.r

Description

gpa_round enhances the base R round function to allow directionality in rounding GPA' fields, e.g. GRAD_GPA, allowing for conventional rounding, rounding up, rounding down, and to which decimal place.

Usage

1
gpa_round(gpa, digits = 1, direction = "none")

Arguments

gpa

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

digits

A single numeric value indicating quantity of decimal places to round. E.g. digits = 2 will round to two decimal places. Parameters exceeding decimal places of values passed in argument gpa = automatically round the last digit. Defaults to digits = 1.

direction

A single string, in quotations, indicating directionality. Possible values include "up", "down", or "none". Defaults to direction = "none".

Value

A scalar or vector of GPA values of class numeric containing per the given parameters. Missing values are preserved.

Author(s)

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

See Also

round, ceiling, floor


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