View source: R/extractDocumentation.R
extractDocumentation | R Documentation |
Extracts doxygen-like GAMS documentation. Entries are introduced with an @type at the beginning of the line. In case of @realization also GAMS code is read and interpreted, in all other cases only the specific documentation comment is evaluated.
extractDocumentation(path, startType = NULL, comment = "*'")
path |
path to the file(s) which should be evaluated |
startType |
set type for first line of code. This can be useful to extract documentation even if no documentation type has been set (e.g reading equations.gms as type realization) |
comment |
comment chars used for documentation comments |
a nested list of documentation pieces with type as name of each element. Each element contains two lists 'content' containing the actual documentation and 'cfg' containing optional attributes passed with the type.
Jan Philipp Dietrich
goxygen
mainfile <- paste0(system.file("dummymodel", package = "gms"), "/main.gms")
calcfile <- paste0(system.file("dummymodel", package = "gms"),
"/modules/02_crazymodule/complex/calculations.gms")
# extracting information from the main file of the model
extractDocumentation(mainfile)
# extracting information from a file with some equations in it
extractDocumentation(calcfile)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.