echo: Print a message in the console.

View source: R/utils.R

echoR Documentation

Print a message in the console.

Description

This function is a wrapper of cat function, but it is more flexible because it allows to use sprintf format.

Usage

echo(format, ..., end = "\n", file = "", append = TRUE)

Arguments

format

(character(1)) The format of the message. See sprintf for more details.

...

(any) The values to be formatted.

end

(character(1)) The end of the message. Default is ⁠\n⁠.

file

(character(1)) The file where the output will be written. Default is "", no file.

append

(logical(1)) If TRUE, append the message to the file.

Examples

## Not run: 
echo("Hello %s!", "World")
echo("%d + %d = %d", 1, 1, 2)

## End(Not run)


brandon-mosqueda/SKM documentation built on Feb. 8, 2025, 5:24 p.m.