keepSignifDig | R Documentation |
Keep significant digits in double numerical columns of a data.table.
keepSignifDig(inDT, inDigits)
inDT |
a data.table with time series in the long format. |
inDigits |
an integer with the number of significant digits. |
a data.table with numeric columns trimmed to the provided number of significant digits.
library(ARCOS)
library(data.table)
locdt = data.table(id = LETTERS[1:10],
x = runif(10))
locdtTrim = ARCOS::keepSignifDig(locdt, 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.