[Feature request] Run example code within Rd document

I'm reposting issue No. 139193 in hopes of a response.

I work on packages written before roxygen2 and the documentation is written in Rd format. It is often extensive and feature rich.

My issue is that there is no easy way to run code within an Rd document \examples{} section directly from the editor window (though you can run it via the Help tab) but often times I am modifying / debugging the examples in these documents.

You could say use the Rd2roxygen package but that only gets me 80% of the way there at best. It does not work well with S4, currently.

It is possible to add a hook that would recognize code in \examples{} to be runnable and sendable to the console via Ctrl + Enter?

Thank you.

Best regards,

Reproducible RD:


\title{Test Rd document}


    ## runnable code goes here
    1 + 1

The place for formally filing feature requests is the GitHub repository

1 Like

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.