time_format: Display Time In Reasonable Units

Description Usage Arguments Value

View source: R/time.R

Description

Formats such that `max(min(x), .005 * max(x))` is at worst one decimal place. This should work for multi value vectors as well as single value ones.

Usage

1
time_format(x, signif = 4L, inc.units = TRUE, trim = TRUE)

Arguments

x

numeric to format in seconds

scale

how to compute time units, "auto" or "kilosecond" - "femtosecond"

signif

integer(1L) how many significant digits the largest number should have

inc.units

logical(1L) whether to paste the time units to each number

trim

logical(1L) set to FALSE to keep leading whitespace to align all numbers

Value

character formatted numbers for `time_format`, a `time_scaled` S3 object for `time_scale` containing scaled times and units


brodieG/treeprof documentation built on Nov. 11, 2021, 1:36 a.m.