format_range: Format text for a range from a vector

View source: R/format_range.R

format_rangeR Documentation

Format text for a range from a vector

Description

Format the range (i.e., minimum and maximum) from a vector for inclusion in a text document with or without parentheses.

Usage

format_range(x, parentheses = TRUE)

Arguments

x

A vector of numeric values.

parentheses

A logical value specifying if you want the value returned to be wrapped in parentheses or not. By default, they are included.

Details

todo: Format the range values to have a given number of digits if users are not using it for just a year range.

Value

A formatted character string.

Author(s)

Kelli Faye Johnson

Examples

format_range(1:12)

iantaylor-NOAA/Lingcod_2021 documentation built on Oct. 30, 2024, 6:42 p.m.