powered by
stopf calls sprintf of its parameters to build the error message and stops with the given message
stopf(...)
Arguments passed on to base::sprintf
base::sprintf
fmt
a character vector of format strings, each of up to 8192 bytes.
L.Pavot
tryCatch({ file <- "/tmp/test" stopf("Error in %s file.", file) }, error = function(error) { print(error) })
Run the code above in your browser using DataLab