nldoc: Create NetLogo documentation

Description Usage Arguments Details Examples

View source: R/nldoc.R

Description

Create NetLogo documentation

Usage

1
2
3
nldoc(modelfiles, outpath, infotab = TRUE, gui = TRUE, bs = TRUE,
  output_format = "html", number_sections = TRUE, theme = "journal",
  date = today(), toc = TRUE)

Arguments

modelfiles

vector of filepaths to model files

outpath

Path to folder where rendered documentation should be created

infotab

TRUE/FALSE, if TRUE infotab section will be included in the documentation

gui

TRUE/FALSE, if TRUE a table with GUI elements from the model will be included in the documentation

bs

TRUE/FALSE, if TRUE a table with behavior space experiments will be included in the documentation

output_format

either "html", "pdf" or "docx"

theme

markdown theme, supported themes are "journal", "cerulean", "flatly", "readable", "spacelab", "united", "cosmo"

date

date that is printed in the documentation header

toc

TRUE/FALSE, if TRUE the documentation contains a table of contents - only for html and pdf output format

number_ections

TRUE/FALSE, if TRUE sections in the documentation will be numbered

Details

nldoc reads model code from the provided model files. The code is then split into several groups (code, gui, behavior space). The procedures then finds noxygen commands within the NetLogo model code. For a complete list of noxygen commands type ?nldoc These commands are translated into a markdown documentation file. If needed, tables of gui elements and behavior space experiments are added to the markdown file. Finally, the document is rendered in the specified format.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 

# List model files (.nls subfiles are also supported)
modelfiles <- c("https://raw.githubusercontent.com/nldoc/nldoc_playground/master/0_Fire_NetLogoDoc.nlogo",
                "https://raw.githubusercontent.com/nldoc/nldoc_playground/master/1_Fire_nls_example.nls")

# Create documentation:
nldoc(modelfiles = modelfiles,
      infotab=TRUE,
      gui=TRUE,
      bs=TRUE,
      outpath = "C:/out",
      output_format = "html",
      number_sections = TRUE,
      theme = "cosmo",
      date = date(),
      toc = TRUE)

## End(Not run)

nldoc/nldoc documentation built on May 13, 2019, 9:52 p.m.