my_round: Round to nearest number

Description Usage Arguments Value Author(s) See Also Examples

Description

Round up or down to nearest user specified number.

Usage

1
my_round(x, n, type)

Arguments

x

Vector of numbers to round.

n

Nearest number to which the x-value should be rounded.

type

A string (either 'ceiling' or 'floor') to indicate if the number should be rounded up or down.

Value

Returns a vector of rounded numbers.

Author(s)

Christoffer Rasmussen

See Also

Other PsychrometricGraph: bar_press, dewpoint, enthalpy_intersect, enthalpy, hum_ratio_enthalpy, hum_ratio_rel_hum, hum_ratio, par_w_press, psychrometric_chart, sat_hum_ratio, sat_w_press, slope_rel_hum, theme_climateeng_psy, theme_parms

Examples

1
2
my_round(24.9, 5, "floor")
my_round(c(24.9, 20.1, 25), 5, "ceiling")

jinlee86/bems_analysisr_package documentation built on May 14, 2019, 8:34 a.m.