Reputation: 5165
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.
Upvotes: 3
Views: 90
Reputation: 368439
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 ...
Upvotes: 4