Learn R Programming

BBmisc (version 1.13)

catf: Wrapper for cat and sprintf.

Description

A simple wrapper for cat(sprintf(...)).

Usage

catf(..., file = "", append = FALSE, newline = TRUE)

Value

Nothing.

Arguments

...

[any]
See sprintf.

file

[character(1)]
See cat. Default is “”.

append

[logical(1)]
See cat. Default is FALSE.

newline

[logical(1)]
Append newline at the end? Default is TRUE.

Examples

Run this code
msg = "a message."
catf("This is %s", msg)

Run the code above in your browser using DataLab