round_list: Round all values in an arbitrarily complex list. All...

View source: R/rounding.R

round_listR Documentation

Round all values in an arbitrarily complex list. All character values are ignored and returned as they were

Description

Round all values in an arbitrarily complex list. All character values are ignored and returned as they were

Usage

round_list(lst = NULL, digits = 2, print_elem_names = FALSE)

Arguments

lst

A list of arbitrary complexity

digits

The number of decimal points to round all numeric values to

print_elem_names

Logical. Print names of each list element to the screen

Details

This is a recursive function and therefore can have an arbitrary nesting of lists.

Value

A list in the same format as lst but with all values rounded to digits decimal points


pbs-assess/gfutilities documentation built on Sept. 18, 2023, 7:57 a.m.