glossary_add {glossary}R Documentation

Add a definition

Description

Write a term and definition to an existing glossary file.

Usage

glossary_add(term, def, path = glossary_path(), replace = FALSE)

Arguments

term

The term to define

def

The definition to add

path

the path to the glossary file; set default with glossary_path

replace

Whether to replace an existing definition

Value

NULL; Called for side effects

Examples

# make a new glossary file
path <- tempfile("glossary", fileext = ".yml")
glossary_path(path, create = TRUE)

# add an entry for "joins"
glossary_add("joins", "Ways to combine data from two tables")

# now you can access the definition
glossary("joins")

[Package glossary version 1.0.0 Index]