printfp {W4MRUtils}R Documentation

printfp - to paste, format and print a string

Description

printfp calls paste and sprintf of its parameters to build the error message and prints with the given message

Usage

printfp(x, ...)

Arguments

x

a list of format string to concatenate before using sprintf on it.

...

Arguments passed on to base::paste

sep

a character string to separate the terms. Not NA_character_.

collapse

an optional character string to separate the results. Not NA_character_.

recycle0

logical indicating if zero-length character arguments should lead to the zero-length character(0) after the sep-phase (which turns into "" in the collapse-phase, i.e., when collapse is not NULL).

Author(s)

L.Pavot

Examples


file <- "/tmp/test"
printfp(
  list(
    "Very log error message that needs to be cut on multiple lines,",
    "and paste back together, but there are formatings like",
    "%%s for example, that provides a placeholder for parameters.",
    "Here %%s value is %s."
  ), file
)


[Package W4MRUtils version 1.0.0 Index]