new_digits: Create a digits object

View source: R/class-digits.R

new_digitsR Documentation

Create a digits object

Description

The idea here is to capture three pieces of data: (1) a function for formatting digits in an output number (2) a default number of digits to use and (3) a named list with digit customization information; the names correspond to potential future column names and the values are custom digit information.

Usage

new_digits(.fun = sig, .default = 3, ..., .data = NULL)

Arguments

.fun

function for modifying digits on a number

.default

the default value for digits

...

name=value pairs, where name references the data column name and value is the number of digits for that columns

.data

a named list to be used in place of ...

Examples


x <- new_digits(round, .default = 2, WT = 1, ALB = 3)

as.list(x)


metrumresearchgroup/pmtables documentation built on Dec. 22, 2024, 1:34 a.m.