powered by
Compute the range of an R object, and format it as string suitable for printing.
formatted_range(x, na.rm = TRUE, digits = 3, nsmall = 2, collapse = "..")
an R object
logical, indicating if NA's should be omitted.
NA
numeric, passed to same name parameters of format().
format()
character, passed to same name parameter of paste().
paste()
range, format and paste.
range
format
paste
formatted_range(c(1, 3.5, -0.01))
Run the code above in your browser using DataLab