factorial2x2 (version 0.1.0)

roundDown: Round down a negative number

Description

Rounds a negative number to the nearest, more negative number to a specified decimal place.

Usage

roundDown(x, dig)

Arguments

x

number to be rounded

dig

number of decimal places to be rounded

Details

roundDown is used to round a negative Z-statistic critical value, which has (infinitely) many significant digits, to the nearest dig decimal place which is more extreme than the critical value itself. This is done to preserve the desired type I error level.

Examples

Run this code
# NOT RUN {
roundDown(-1.95456, 2)
# [1] -1.96
# }

Run the code above in your browser using DataLab