tok_plot: Draw a model

View source: R/tok.R

tok_plotR Documentation

Draw a model

Description

Shows the diagram in the RStudio or Positron viewer, or in the web browser.

Usage

tok_plot(x, title = NULL, lang = getOption("tok.lang", "en"))

Arguments

x

A model: a tok_model, the path of a .tok file, or the text of a model.

title

Title drawn above the diagram (SVG only).

lang

Language of the messages, "en" or "pl". The default comes from the option tok.lang.

Value

The path of the temporary SVG file, invisibly.

Examples

if (interactive()) {
  tok_plot(system.file("examples", "wypozyczenie.tok", package = "tokr"))
}

tokr documentation built on Nov. 26, 2026, 5:08 p.m.