Skip to content
Back to formatted view

Raw Message

Message-ID: <C1E5430B-F134-42E9-8D6D-1FB4FFCBF5CE@kasterma.net>
Date: 2014-08-22T10:02:53Z
From: Bart Kastermans
Subject: knitr and stopifnot replacement.

I have a daily generated report in which I put a check using stopifnot.  Unfortunately
I didn?t check the effect very well, turns out that if the condition checked fails
this is not shown in the knitr output (I only get an error much later due to a missing
object).

So my question is, what is the correct way to use assertions in a <filename>.Rnw
file.  I want to perform a check, and if it fails everything should stop with a message
I can generate.

Thanks,

Best,
Bart