knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

glosario

R build status codecov

glosario allows users to create and retrieve multilingual glossaries. By default, glosario provides access to a community-curated glossary hosted by The Carpentries. This repository also documents the structure expected for the glossaries that can be managed by glosario.

There is also a Python interface.

Installation

glosario is still in the development stage and is only available from GitHub with:

# install.packages("remotes")
remotes::install_github("carpentries/glosario-r")

Example

library(glosario)

define("data frame")

To get definitions in other languages we would do:

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)

To add links to definitions, you can use the gdef function for inline writing:

This is a `r gdef('data_frame', 'Data Frame')`, they are used for storing data.

Which would look like this:

This is a r gdef('data_frame', 'Data Frame'), they are used for storing data.



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