Learn R Programming

photobiology (version 0.11.4)

formatted_range: Compute range and format it

Description

Compute the range of an R object, and format it as string suitable for printing.

Usage

formatted_range(x, na.rm = TRUE, digits = 3, nsmall = 2, collapse = "..")

Arguments

x

an R object

na.rm

logical, indicating if NA's should be omitted.

digits, nsmall

numeric, passed to same name parameters of format().

collapse

character, passed to same name parameter of paste().

See Also

Examples

Run this code
formatted_range(c(1, 3.5, -0.01))

Run the code above in your browser using DataLab