keepSignifDig: Keep significant digits

View source: R/utils.R

keepSignifDigR Documentation

Keep significant digits

Description

Keep significant digits in double numerical columns of a data.table.

Usage

keepSignifDig(inDT, inDigits)

Arguments

inDT

a data.table with time series in the long format.

inDigits

an integer with the number of significant digits.

Value

a data.table with numeric columns trimmed to the provided number of significant digits.

Examples

library(ARCOS)
library(data.table)

locdt = data.table(id = LETTERS[1:10],
                x = runif(10))

locdtTrim = ARCOS::keepSignifDig(locdt, 2)


dmattek/ARCOS documentation built on Dec. 5, 2024, 11:02 p.m.