Skip to content

Change data representation to list?  #1

@jperkel

Description

@jperkel

Instead of representing the params, cmds and subcmds as data.frame(), it might be easier to use lists. eg:

parser
   |-cmds
        |-cmd1
             |-name: "add"
             |-helptext: "help text"
        |-cmd2
             |-name: "delete"
             |-helptext: "help text"
   |-params
         |-param1
              |-lparam: "print"
              |-sparam: "p"
              |-helptext: "help text"
              |-type: "bool"
              |-default: FALSE
         |-param2
              |-lparam: "infile"
              |-sparam: "i"
              |-helptext: "help text"
              |-type: "variable"
             .
             .
             .

Then you can access eg all cmds with lapply(parser$cmds, '[[', 'cmd')

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions