Skip to contents

Truncate a numeric vector to a certain number of decimal places

Usage

truncate(x, digits = 0)

Arguments

x

A numeric vector to be truncated

digits

A single numeric value indicating the number of decimal places to round to Default is 0

Value

A numeric vector of x truncated to digits decimal places