Description Usage Arguments Value Examples
Parse any section from an MTG
1 | parse_MTG_section(MTG, section_name, header, next_section, allow_empty)
|
MTG |
A pre-formatted MTG |
section_name |
The section name in the file |
header |
The header of the section |
next_section |
The name of the next section |
allow_empty |
Boolean. Allow the section to be empty ? |
A data.frame with the section results, or a tree for the MTG.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
filepath= system.file("extdata", "simple_plant.mtg", package = "XploRer")
MTG_file = strip_comments(MTG_file)
MTG_file = strip_empty_lines(MTG_file)
# Checking that all sections are present and ordered properly:
check_sections(MTG_file)
# parse the classes section from the MTG:
parse_MTG_section(MTG_file, "CLASSES:",
c('SYMBOL', 'SCALE', 'DECOMPOSITION', 'INDEXATION', 'DEFINITION'),
"DESCRIPTION:",FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.