Learn R Programming

cwhmisc (version 3.0)

pasteRound: Paste rounded values

Description

Paste rounded values

Usage

pasteRound(..., digits=16, sep=" ", collapse=NULL)

Arguments

...
list of arguments to be pasted.
digits
argument to round.
sep
argument to paste.
collapse
argument to paste.

Value

  • The concatenation of formatted values

Examples

Run this code
x <- rnorm(3)
x
pasteRound("x1=", x[1], ", x2=", x[2], ", x3=", x[3], sep="", collapse=",")
pasteRound("x1=", x[1], ", x2=", x[2], ", x3=", x[3], digits=3, sep="", collapse=",")

Run the code above in your browser using DataLab