I wonder what is the best practice in attaching R scripts with examples to an R package. I mean R script with examples such as:
I am not sure if there are any other "elegant" ways of including such examples.
I would use
demo/ directory, orinst/examples/ directoryThe former leads to use by demo() and has some extra requirements spelled out in Writing R Extensions, the latter is simpler.
Lastly you of course just write a vignette document ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With