Skip to content

[R-pkg-devel] Falling gracefully in subsequent code

3 messages · Michael Chirico, Rafael Pereira

#
Thank you all for the kind suggestions! Dirk's advice (in the same spirit
of Hadely's suggestion) should work like a glove !

For the record, I really appreciate how supportive the R community (and
this group in particular) is. Thanks a bunch and happy New Year!

best,
Rafa Pereira
On Tue, Dec 30, 2025 at 2:54?PM Hadley Wickham <h.wickham at gmail.com> wrote:

            

  
  
#
Sharing here a solution I was happy with:

```{r, eval=!is.null(df), ...}

this has the advantage of hiding the distracting edge case handling from
the expository code being shown to the vignette reader.

Mike C

On Thu, Jan 1, 2026, 4:53?PM Rafael H. M. Pereira <rafa.pereira.br at gmail.com>
wrote:

  
  
1 day later
#
??

Rafael H. M. Pereira reacted via Gmail
<https://www.google.com/gmail/about/?utm_source=gmail-in-product&utm_medium=et&utm_campaign=emojireactionemail#app>

On Fri, Jan 2, 2026 at 2:09?PM Michael Chirico <michaelchirico4 at gmail.com>
wrote: