The appropriate place for the examples used in your roxygen is:
inst/examples/
The roxygen string should be:
Is this a good practice? I think it is, because:
- This makes it easy to run, modify, and test development examples.
- This allows you (in principle, at least) to reuse examples in different places in the documentation, for example. in vignette
source share