knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

To get a single definition, you just need to pass a slug with the term you want defined.

library(glosario)

define('data_frame')

If you don't know the exact slug for the term you're searching, don't worry. Type the term as close as you remember and define will try to match it to the closes term we have available.

define('data frame')

define is not constrained to a single language. In one code chunk you can define terms both in English and French, for example.

define('plus one', lang = 'en')
define('plus one', lang = 'fr')

If you want to use your custom glossary file you can do it the following way:

custom_url <- "https://raw.githubusercontent.com/carpentries/glosario/master/glossary.yml"

g <- get_glossary(url = custom_url)

define("plus_one", lang = 'fr', glossary = g)


carpentries/glosario-r documentation built on April 25, 2023, 8:48 p.m.