lintr for rmarkdown inline code?

I write a lot of inline code in my rmarkdown documents so that any markdown text with numbers (e.g., statistical model results, summary data) is reproducible and updates automatically with any changes to the input data.

Are there any lintr functions to detect if the inline code either errors or returns NULL? Right now, if the inline code errors/returns NULL, there's no indication and the inline code just leaves a blank in the report - so its easy to miss if some inline code doesn't work or stops working.


I’ve not used {lintr} but it looks like overkill unless there are specific errors expected that standard linters can be applied or custom linters written.

Instead, I’d wrap a chunk in try.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.