Site icon R-bloggers

Simpler R help tooltips

[This article was first published on R Enthusiasts, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

I posted yesterday about R Help tooltips. I have started to use them e.g. on the graph gallery

However, I’m quickly frustrated with having to write the full url, i.e if I want to add a link to the help page for the pacf function in stats, I need to find this link:

<a href="http://help.r-enthusiasts.com/library/stats/html/acf.html">pacf</a>

Note here that the pacf function is documented in the acf.html file.

I then modified the tooltip plugin so that links like these get the tooltip

<a data-rhelp="stats::pacf">pacf</a>

And the plugin finds the correct link, set it to the href attribute, and enable the tooltip

Some examples: pacf, barchart

To leave a comment for the author, please follow the link and comment on their blog: R Enthusiasts.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.