Learn R Programming

W4MRUtils (version 1.0.0)

stopf: stopf - to stop and format message

Description

stopf calls sprintf of its parameters to build the error message and stops with the given message

Usage

stopf(...)

Arguments

...

Arguments passed on to base::sprintf

fmt

a character vector of format strings, each of up to 8192 bytes.

Author

L.Pavot

Examples

Run this code

tryCatch({
  file <- "/tmp/test"
  stopf("Error in %s file.", file)
}, error = function(error) {
  print(error)
})

Run the code above in your browser using DataLab