-
Notifications
You must be signed in to change notification settings - Fork 237
Description
Hello,
The "rd"" vignette claims that the code of the example is not executed during the check when the If condition is FALSE.
However it seems to me that this is not what happens in reality.
This tag includes some \dontshow in the generated Rd code, and according to Writing R Extensions, the \dontshow macro never prevents the execution of the code, it just hides the code to the user, but during R CMD CHECK, this code is executed.
Here is the WRE illustration:
x <- runif(10) # Shown and run.
\dontrun{plot(x)} # Only shown.
\dontshow{log(x)} # Only run.
And I also found the following claim when I googled:
Examples displayed and executed during checks/example runs:
as is
Examples displayed but NOT executed during checks/example runs:
\dontrun{}
Examples NOT displayed but executed during checks/example runs:
\dontshow{}
Examples NOT displayed and NOT executed during checks/example runs:
simply don't type them anywhere ;-)Best,
Uwe Ligges
Here to be precise. Note this is an old thread (2005).