# RcmdrPlugin.DoE Menu Definitions

# last modified 13 Aug 2011 by U. Groemping

#   type    menu/item      operation/parent  label                                          command/menu                activation  install?

    menu    designMenu        topMenu         ""                                     ""                          ""          ""
    item    topMenu           cascade         "Design"                           designMenu                  ""          ""
    menu    importDoEMenu      designMenu      ""                                   ""                          ""          ""
    item    importDoEMenu      command     "Change working directory..."         Setwd        ""     ""    
    item    importDoEMenu      command     "Load R workspace..."                 loadworkspace                 ""      ""
    item    importDoEMenu      command    "Load experiment from R workspace ..."      Menu.import         "existDesigns()"          ""
    ## implement reading of externally stored responses into this design
#    item    importDoEMenu      command    "How to Re-Import experiment from csv and rda files ..."        HowToReImport          ""          ""
    item    importDoEMenu       command    "Re-Import experiment from csv and rda files ..."        Menu.importrdacsv          ""          ""
        ## e.g. 2-level experiment checked with remodel
        ## find ways to allow certain experiments to be diagnosed and made class design
        ## have users choose responses and x's, hopefully using a menu structure that is already there
    item    importDoEMenu      command    "Info ..."                    helpImport          ""      ""
    item    designMenu        cascade         "Import"                      importDoEMenu                     ""          ""
    menu    exportDoEMenu      designMenu      ""                           ""                          ""          ""
    item    exportDoEMenu      command     "Change working directory..."    Setwd        ""     ""    
    item    exportDoEMenu        command    "Save script as ..."            saveLogAs                      ""          ""
    item    exportDoEMenu        command    "Save output as ..."            saveOutputAs                      ""          ""
    item    exportDoEMenu        command    "Save R workspace as ..."       saveWorkspaceAs                      ""          ""
    item    exportDoEMenu        command    "Export experiment ..."         Menu.export                      "existDesigns()"          ""
    item    exportDoEMenu      command    "Info ..."                    helpExport          ""      ""
    item    designMenu        cascade    "Export"                           exportDoEMenu                     ""          ""

    menu    designCreateMenu designMenu       ""                                      ""                          ""          ""
    item    designMenu         cascade    "Create design"                   designCreateMenu               ""                     ""
    ## 2-level
    item    designCreateMenu      command    "----------- 2-level ------------------"                   dc                          "FALSE"          ""
    item    designCreateMenu      command    "Screening design ..."                   Menu.pb2level                  ""          ""
    item    designCreateMenu      command    "Regular (Fractional) Factorial ..."     Menu.FrF2level                 ""          ""
    item    designCreateMenu      command      "Experts: load additional catalogue ..."     Menu.loadcatlg  ""          "packageAvailable('FrF2.catlg128')"
    item    designCreateMenu      command    "----------- General ------------------"                   dc                          "FALSE"          ""
    item    designCreateMenu      command    "General Full Factorial Experiments ..." Menu.fac                          ""          ""
    item    designCreateMenu      command    "General orthogonal arrays ..."          Menu.oa                          ""          ""
    item    designCreateMenu      command    "----------- D-optimal ------------------"                   dc                          "FALSE"          ""
    item    designCreateMenu      command    "Candidate design ..."                   Menu.cand                          ""          ""
    item    designCreateMenu      command    "D-optimal design ..."                   Menu.Dopt           "!is.null(ActiveDataSet())"          ""
          ##  augmentation and blocking are still open
    item    designCreateMenu      command    "----------- Combine ------------------"                   dc                          "FALSE"          ""
    item    designCreateMenu      command    "Taguchi inner-outer array ..."          Menu.param          "exist2Designs()"      ""
    item    designCreateMenu      command    "----------- Quantitative --------------"                   dc                          "FALSE"          ""
    item    designCreateMenu      command    "Central composite ..."                  Menu.ccd                          ""          ""
    item    designCreateMenu      command    "Box-Behnken ..."                        Menu.bbd                          ""          ""
    item    designCreateMenu      command    "Space filling latin hypercube  ..."     Menu.lhs                          ""          ""
    item    designCreateMenu      command    "--------------- Info ------------------"                   dc                          "FALSE"          ""
    item    designCreateMenu      command    "Info 2-level designs"                   help2level                   ""          ""
    item    designCreateMenu      command    "Info general designs"                   helpgeneral                          ""          ""
    item    designCreateMenu      command    "Info quantitative designs"              helpquant                          ""          ""
    item    designCreateMenu      command    "Info D-optimal designs"                 helpDopt                          ""          ""

    menu    designInspectMenu designMenu       ""                                              ""                          ""          ""
    item   designMenu          cascade    "Inspect design"                 designInspectMenu               ""                     ""
    item    designInspectMenu      command    "Display active design ..."        Menu.display                   "activeDataSetDesignP()"          ""
#    item    designInspectMenu      command    "Summarize active design ..."        Menu.summarize                   "activeDataSetDesignP()"          ""
    item    designInspectMenu      command    "Summarize active design"        summarize.design                   "activeDataSetDesignP()"          ""
    item    designInspectMenu      command    "Plot active design ..."        Menu.plot                   "activeDataSetDesignP()"          ""
    item    designInspectMenu      command    "Tabulate active design ..."        Menu.tab                   "activeDataSetDesignP()"          ""
    item    designInspectMenu      command    "Experts: display design.info for active design"        design.info.design        "activeDataSetDesignP()"          ""
    item    designInspectMenu      command    "Info ..."                               helpInspect          ""      ""
    
    menu    designUtilityMenu designMenu       ""                                      ""                          ""          ""
    item    designUtilityMenu      command    "Add response variable(s) ..."            Menu.addresponse          "activeDataSetDesignP()"      ""
    item    designUtilityMenu      command    "Select / Deselect response variables ..."     Menu.responses          "activeDataSetDesignP()"      ""
    item    designUtilityMenu      command    "Remove column(s) ..."     Menu.colremove          "activeDataSetDesignRemovableP()"      ""
    item    designUtilityMenu      command    "Change factor contrast(s) ..."     Menu.changecontr          "activeDataSetDesignQualP()"      ""
    item    designUtilityMenu      command    "----------------------------------"                   dc                          "FALSE"          ""
    item    designUtilityMenu      command    "Change from long to wide format ..."     Menu.wide          "activeDataSetDesignLongToWide()"      ""
    item    designUtilityMenu      command    "Aggregate design ..."            Menu.aggregate                   "activeDataSetDesignWide()"      ""
    item    designUtilityMenu      command    "----------------------------------"                   dc                          "FALSE"          ""
    #item    designUtilityMenu      command    "Fold design ..."            dc          "FALSE"      ""
       ## will be activeDataSetDesign2P()
    item    designUtilityMenu      command    "Add center points ..."            Menu.addcenter          "activeDataSetDesign2Pwoc()"      ""
    item    designUtilityMenu      command    "Add star portion for central composite design ..."            Menu.ccd          "activeDataSetDesign2Pnoccd()"      ""
    item    designUtilityMenu      command    "Remove star portion from central composite design ..."        Menu.pickcube     "activeDataSetDesignccd()"      ""
    item    designUtilityMenu      command    "Augment lhs design ..."            Menu.augmentlhs          "activeDataSetDesignlhs()"      ""
    item    designUtilityMenu      command    "----------------------------------"                   dc                          "FALSE"          ""
    item    designUtilityMenu      command    "Info ..."                helpModify          ""      ""
    item    designMenu       cascade    "Modify design"                 designUtilityMenu               ""                     ""

    menu    designAnalMenu designMenu       ""                    ""          ""          ""
    item   designMenu          cascade    "Analyze design"              designAnalMenu               ""                     ""
    item    designAnalMenu     command    "Default linear model ..."    Menu.model      "activeDataSetDesignPResp() & !activeDataSetDesignparamlong()"      ""
    item    designAnalMenu      command    "--------- General factorial designs ---------------"                   dc                          "FALSE"          ""
    item    designAnalMenu      command         "Main Effects and Interaction Plots ..."        Menu.PlotMeansDoE       "numericP() && factorsP() && activeDataSetDesignPResp()"          ""
    item    designAnalMenu      command    "--------- 2-level designs ---------------"                   dc                          "FALSE"          ""
    item    designAnalMenu     command    "Effects (Half) Normal Plots ..."             Menu.EffectPlots           "activeDataSetDesign2PResp()"      ""
    item    designAnalMenu     command    "Main Effects and Interaction Plots ..."       Menu.IAPlot        "activeDataSetDesign2PResp()"      ""
    item    designAnalMenu      command    "--------- Quantitative factors ----------"                   dc                   "FALSE"          ""
#    item    designAnalMenu     command    "Info on quantitative analysis tools..."             helpQuantDesignAnalyze      "activeDataSetDesignPResp()"      ""
    item    designAnalMenu  command         "Response surface model ..."        Menu.rsmmodel              "activeDataSetDesignPResp() & !activeDataSetDesignparamlong()"          ""
    item    designAnalMenu  command         "Steepest slope ..."                Menu.steepest              "activeModelRSM()"          ""
    item    designAnalMenu  command         "Response surface plots ..."        Menu.contour              "activeModelLM()"          ""
    item    designAnalMenu      command    "-----------------------------------------"                   dc                   "FALSE"          ""
    item    designAnalMenu     command    "Info ..."             helpAnalyze    ""      ""

    menu    sepMenu designMenu ""    ""    ""    ""
    item    designMenu      cascade    "-----------------------------------"                sepMenu                     ""          ""
    
    menu    designHelpMenu  designMenu    ""                      ""                          ""          ""
    item    designHelpMenu  command    "------- Info on selected statistical topics --------"         dc                 "FALSE"          ""
    item    designHelpMenu  command    "Glossary for 2-level designs ..."              displayGlossary                          ""          ""
    item    designHelpMenu  command    "2-level screening designs vs. regular fractional factorial designs ..."       help2level                          ""          ""
    item    designHelpMenu  command    "Blocking of 2-level designs ..."              displayblock                          ""          ""
    item    designHelpMenu  command    "2-level split-plot designs ..."              displaysplitplot                          ""          ""
    item    designHelpMenu  command    "Central composite designs ..."              displayCentralCompositeDesigns                          ""          ""
    item    designMenu      cascade    "Help on Experimental Design..."                designHelpMenu                     ""          ""

    menu    designUseHelpMenu  designMenu    ""                      ""                          ""          ""
    item    designUseHelpMenu  command    "------- Info on using the Design menu --------"         dc                 "FALSE"          ""
    item    designUseHelpMenu  command    "How to make menus behave appropriately ..."              helpMenus                          ""          ""
    item    designUseHelpMenu  command    "Export/import help ..."                        helpExpImp                          ""          ""
    item    designMenu      cascade    "Help on Using the Design Menu ..."                designUseHelpMenu                     ""          ""

    menu    aboutDesign    designMenu        ""        ""         ""            ""
    item    aboutDesign    command      "About RcmdrPlugin.DoE"        helpabout     ""      ""
    item    designMenu    cascade      "About RcmdrPlugin.DoE"         aboutDesign   ""      "" 