formatTable: Format by digit

View source: R/Common.R

formatTableR Documentation

Format by digit

Description

Format by digit

Usage

formatTable(df, digit = 2)

Arguments

df

numeric data.frame

digit

default = 2

Examples

If you want to format by column respectively
tab_test <- structure(list(col1 = c(2e-05, 0.001, 0.568978554112256), col2 = c(3.5,45.6546548788, 12585.5663), col3 = c(200, 34.52, NA)), class = "data.frame", row.names = c(NA,-3L))
as.data.frame(Map(loonR::formatTable, tab_test, c(3L, 2L, 2L)))

ProfessionalFarmer/loonR documentation built on Oct. 9, 2024, 9:56 p.m.