doc-tools: Tools for documenting engines

doc-toolsR Documentation

Tools for documenting engines

Description

parsnip has a fairly complex documentation system where the engines for each model have detailed documentation about the syntax, tuning parameters, preprocessing needs, and so on.

The functions below are called from .R files to programmatically generate content in the help files for a model.

  • find_engine_files() identifies engines for a model and creates a bulleted list of links to those specific help files.

  • make_seealso_list() creates a set of links for the "See Also" list at the bottom of the help pages.

  • find_engine_files() is a function, used by the above, to find the engines for each model function.

Usage

find_engine_files(mod)

make_engine_list(mod)

make_seealso_list(mod, pkg = "parsnip")

Arguments

mod

A character string for the model file (e.g. "linear_reg")

pkg

A character string for the package where the function is invoked.

Details

parsnip includes a document (README-DOCS.md) with step-by-step instructions and details. See the code below to determine where it is installed (or see the References section).

Most parsnip users will not need to use these functions or documentation.

Value

make_engine_list() returns a character string that creates a bulleted list of links to more specific help files.

make_seealso_list() returns a formatted character string of links.

find_engine_files() returns a tibble.

References

https://github.com/tidymodels/parsnip/blob/main/inst/README-DOCS.md

Examples


# See this file for step-by-step instructions.
system.file("README-DOCS.md", package = "parsnip")

# Code examples:
make_engine_list("linear_reg")

cat(make_engine_list("linear_reg"))


parsnip documentation built on June 24, 2024, 5:14 p.m.