I'm aware of this documentation (https://cran.r-project.org/web/packages/roxygen2/vignettes/extending.html) but I am struggling to make it work for a custom "home brew" package. All I really need is a "simple" custom tag e.g. @information. There seems to be some information missing to bridge the gap (for me) between the documentation and actually having it work in a package (a working example would be great).
I also found this video:
https://www.youtube.com/watch?v=AcibRDNSfoM
and related repositories:
https://github.com/shahronak47/informationtag
https://github.com/shahronak47/infotagdemo
However, they also don't seem to be doing what I would expect.
Can anyone point me at some useful examples?
Leaning on the example made with the
@tiptag in the Extending roxygen2 vignette for a simple descriptive tag@informationall you need to do is create a file in theR/folder of your package and add this content to the file:Later on you can just use the tag as any other tag in your roxygen headers:
Hope this helps!
EDIT:
If you want to create a separate package for custom roclets and import them when needed, then in your custom package
{myroclets}create a file inR/and add the same contents as stated above. Additionally you need to add a constructor for your@informationtag so append the file withto export your
information_roclet.In the case you need to use the
information_rocletin another package of yours, just add to DESCRIPTIONwhere
myrocletsis the package where theinformation_rocletwas originally created.