extractDocumentation: extractDocumentation

Description Usage Arguments Value Author(s) See Also Examples

View source: R/extractDocumentation.R

Description

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.

Usage

1
extractDocumentation(path, start_type = NULL, comment = "*'")

Arguments

path

path to the file(s) which should be evaluated

start_type

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

Value

a list of documentation pieces with type as name of each element

Author(s)

Jan Philipp Dietrich

See Also

goxygen

Examples

1
2
3
4
5
6
7
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)

goxygen documentation built on Aug. 16, 2020, 5:06 p.m.