knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
Despite the predominant use of R for data manipulation and various robust statistical calculations, in recent years, more people from various disciplines are beginning to use R for other purposes. A critical milestone that has enabled large influx of users in the R community is the development of the Tidyverse family of packages and Rmarkdown. With the latter, one can write all kinds of documents and produce output in formats such html and pdf very easily. In doing this seemlessly, further tools are needed for such users to easily and freely write in R for all kinds of purposes. The r2dictionary introduces a means for users to directly search for definitions of terms within the R environment.
Below is an example to demonstrate how the r2dictionary package can be used to retrieve definition of words
First, attach the package to load the dictionary
Second, call the define or definition or meaning function to retrieve the definition of the term
define("pharmacokinetics") #or definition("pharmacokinetics") #or meaning("pharmacokinetics")
Select a word in a currently opened file. Go to the addins dropdown in RStudio and select "Define selected text"
defineSelected() #or defineSel()
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.