Learn R Programming

erratum (version 2.2.0)

template: Templates

Description

Define error and warning templates.

Usage

template.e(pat = "%s")

template.w(pat = "%s")

Arguments

pat

Pattern to use, must include %s, forwarded to sprintf().

Examples

Run this code
# NOT RUN {
msg <- "Something's wrong" 

# default
e(msg)

# template
template.e("Whoops: %s - sorry!")
e(msg)

# reset
template.e()

# }

Run the code above in your browser using DataLab