# EZR Menu Definitions

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

    menu    FileMenu        topMenu         ""                                              ""                          ""          			""
    item    topMenu         cascade         "File"                                          FileMenu                    ""          			""
    item    FileMenu        command         "New data set"               					newDataSet                  ""         				"!MacOSXP()"
    item    FileMenu        command         "Load data set"                        			StatMedLoadDataSet          ""          			""
    menu    ImportMenu      FileMenu        ""                                              ""                          ""          			""
    item    FileMenu        cascade         "Import data"                              		ImportMenu                  ""          			""
    item    ImportMenu      command         "Read Text Data From File, Clipboard, or URL"	StatMedReadDataSet          ""          			""
    item    ImportMenu      command         "from SPSS data set"                           	StatMedImportSPSS           ""          			"packageAvailable('foreign')"
    item    ImportMenu      command         "from Minitab data set"                      	StatMedImportMinitab        ""          			"packageAvailable('foreign')"
    item    ImportMenu      command         "from Stata data set"                        	StatMedImportSTATA          ""          			"packageAvailable('foreign')"
    item    ImportMenu      command         "from Excel, Access, dBase data set"       		StatMedImportRODBCtable     ""          			"(.Platform$OS.type == 'windows') && packageAvailable('RODBC')"	
    item    FileMenu        command         "Read data set from an attached package"     	readDataFromPackage         ""          			""
    item    FileMenu        command         "Save active data set"                       	StatMedSaveDataSet          ""						""
#    item    FileMenu        command         "Export active data set"                     	StatMedExportDataSet        ""    					""
    item    FileMenu        command         "Load script file"                           	loadLog                     ""          			""
    item    FileMenu        command         "Save script"                          			saveLog                     ""          			""
    item    FileMenu        command         "Save script as"                     			saveLogAs                   ""          			""
    item    FileMenu        command         "Save output"                                	saveOutput                  ""          			""
    item    FileMenu        command         "Save output as"                        		saveOutputAs                ""          			""
    item    FileMenu        command         "Load work space file"                         	StatMedLoadWorkspace               ""          			""
    item    FileMenu        command         "Save work space"                         		saveWorkspace               ""          			""
    item    FileMenu        command         "Save work space as"                 			saveWorkspaceAs             ""          			""
    item	FileMenu		command			"Change working directory"						Setwd						""						""
    menu    ExitMenu        FileMenu        ""                                              ""                          ""          			""
    item    FileMenu        cascade         "Exit"                                          ExitMenu                    ""          			""
    item    ExitMenu        command         "From Commander"                                StatMedCloseCommander              ""          			""
    item    ExitMenu        command         "From Commander and R"                          StatMedcloseCommanderAndR          ""          			""

    menu    EditMenu        topMenu         ""                                              ""                          ""          			""
    item    topMenu         cascade         "Edit"                                          EditMenu                    ""          			""
    item    EditMenu        command         "Cut"                                           onCut                       ""          			""
    item    EditMenu        command         "Copy"                                          onCopy                      ""          			""
    item    EditMenu        command         "Paste"                                         onPaste                     ""          			""
    item    EditMenu        command         "Delete"                                        onDelete                    ""          			""
    item    EditMenu        command         "Find..."                                       onFind                      ""          			""
    item    EditMenu        command         "Select all"                                    onSelectAll                 ""          			""
    item	EditMenu		command			"Undo"											onUndo						""						""
    item	EditMenu		command			"Redo"											onRedo						""						""
    item    EditMenu        command         "Clear window"                                  onClear                     ""          			""
	
	menu    DATA            topMenu         ""                                              ""                          ""          			""
    item    topMenu         cascade         "Active data set "                       		DATA                     	""          			"" 

	menu    Variables       DATA 	        ""                                              ""                          ""          				""
    item    DATA         	cascade         "Variables"     								Variables                  	""          				"" 
	item    Variables      	command         "Show variables in active data set"            	StatMedVariableCheck    	"activeDataSetP()"          ""    
    item    Variables       command         "Create new variable"          					StatMedCompute	       		"activeDataSetP()"          ""
    item    Variables       command         "Bin numeric variable"          				StatMedBinVariable          "activeDataSetP()"          ""
    item    Variables 		command         "Bin numeric variable with specified threshold"	StatMedNewVar          		"activeDataSetP()"          ""
    item    Variables       command         "Logarithmic transformation"       				StatMedLog      			"activeDataSetP()"          ""
    item    Variables       command         "Convert numeric variables to factors"       	StatMedNumericToFactor      "activeDataSetP()"          ""
    item    Variables       command         "Convert factors or character variables to numeric variables" StatMedFactorToNumeric "activeDataSetP()" ""
    item    Variables       command         "Convert all character variables to factors" 	StatMedChrToFactor 			"activeDataSetP()"          ""
    item    Variables       command         "Reorder factor levels"                      	StatMedReorderFactor        "activeDataSetP()"          ""
    item    Variables       command         "Define contrasts for a factor"              	StatMedSetContrasts         "activeDataSetP()"          ""
    item    Variables       command         "Create dummy variables"              			StatMedDummy         		"activeDataSetP()"          ""
    item    Variables       command         "Compute difference between two date variables"	StatMedDatediff             "activeDataSetP()"          ""
    item    Variables	   	command         "Rename variables"                           	StatMedRenameVariables      "activeDataSetP()"          ""
    item    Variables	   	command         "Delete variables from data set"            	StatMedDeleteVariable     	"activeDataSetP()"          ""
    item    Variables      	command         "Stack two data set"       						StatMedStack                "activeDataSetP()"         	""

	menu    Rows		   	DATA 	        ""                                              ""                          ""          				""
    item    DATA         	cascade         "Rows"     										Rows                  		""          				"" 
    item    Rows       		command         "Create subset data set"      					StatMedSubsetDataSet 	"activeDataSetP()"          ""
    item	Rows		    command			"Remove row(s) from active data set"			RemoveRows					"activeDataSetP()"          ""
    item	Rows		    command			"Sort rows"			       						StatMedSort					"activeDataSetP()"          ""

	menu    NAdata       	DATA 	        ""                                              ""                          ""          				""
    item    DATA         	cascade         "Missing observations"     						NAdata                  	""          				"" 
    item    NAdata       	command         "Count missing observations of specified variables" 	StatMedCountMissing         	"activeDataSetP()"          ""    
    item    NAdata       	command         "Count missing observations of all variables"	countMissing				"activeDataSetP()"          ""    
    item    NAdata          command         "Convert missing observations to a group"		StatMedNAgroup				"activeDataSetP()"          ""
    item    NAdata          command         "Remove rows with missing data in specified variables"	StatMedFilterNA		"activeDataSetP()"          ""
    item    NAdata          command         "Remove rows with any missing data"				filterNA					"activeDataSetP()"          ""
		
	menu    DataSave		DATA 	        ""                                              ""                          ""          				""
    item    DATA         	cascade         "Save or export active data set"				DataSave                  	""          				"" 
    item    DataSave        command         "Renew active data set"  StatMedRenewDataSet	"activeDataSetP()"          ""
    item    DataSave        command         "Save active data set"							saveDataSet                 "activeDataSetP()"          ""
    item    DataSave        command         "Export active data set (Text)"					StatMedExportDataSet        "activeDataSetP()"          ""
    item    DataSave        command         "Export active data set (Stata)"				StatMedExportStata        "activeDataSetP()"          "packageAvailable('foreign')"
	
    menu    StatMed         topMenu         ""                                              ""                          ""         					"" 
    item    topMenu         cascade         "Statistical analysis"                            			StatMed                     ""          				"" 
 	
	menu    Discrete        StatMed         ""                                              ""                          ""          				""
    item    StatMed         cascade         "Discrete variables"                                	Discrete                    ""          				"" 
    item    Discrete        command         "Frequency distributions"                                 		StatMedFrequency       		"activeDataSetP()"        	""    
    item    Discrete        command         "Confidence interval for a proportion"                      		StatMedProbCI               ""          				""    
    item    Discrete        command         "One sample proportion test"                  				StatMedProbSingle           "activeDataSetP()"          				""    
    item    Discrete        command         "Confidence interval for a difference between two proportions"                  	StatMedProbDiffCI           ""          				""    
    item    Discrete        command         "Confidence interval for a ratio of two proportions"                  	StatMedProbRatioCI          ""          				""    
    item    Discrete      	command         "Enter and analyze two-way table"            				StatMedEnterTable           ""  						"packageAvailable('abind')"
    item    Discrete        command         "Create two-way table and compare two proportions (Fisher's exact test)" 	StatMedTwoWayTable          "activeDataSetP()"          ""
    item    Discrete        command         "Compare proportions of two paired samples (McNemar test)" 	StatMedMcNemar      "activeDataSetP()"          ""
    item    Discrete        command         "Compare proportions of more than two paired samples (Cochran Q test)" 		StatMedCochranQ	      		"activeDataSetP()"          ""
    item    Discrete        command         "Cochran-Armitage test for trend in proportions" 			StatMedPropTrend          	"activeDataSetP()"          ""
    item    Discrete        command         "Logistic regression" 		StatMedLogisticRegression   "activeDataSetP()"          ""

    menu    Continuous      StatMed         ""                                              ""                          ""          				""
    item    StatMed         cascade         "Continuous variables"                              	Continuous                  ""          				"" 
    item    Continuous      command         "Numerical summaries"                               	StatMedNumericalSummaries  	"activeDataSetP()" 			"packageAvailable('abind')"
    item    Continuous      command         "Smirnov-Grubbs test for outliers"         	StatMedSG	              	"activeDataSetP()"			""    
    item    Continuous      command         "Kolmogorov-Smimov test for normal distribution"            StatMedKS           			"activeDataSetP()"          ""
    item    Continuous      command         "Confidence interval for a mean"              			StatMedMeanCI              	""          				""    
    item    Continuous      command         "Single-sample t-test"                    		StatMedSingleSampleTTest   	"activeDataSetP()"          ""
    item    Continuous      command         "Two-variances F-test"            			StatMedFTest           		"activeDataSetP()"          ""
    item    Continuous      command         "Two-sample t-test"            			StatMedTtest                "activeDataSetP()"          ""
    item    Continuous      command         "Paired t-test"     	StatMedPairedTtest			"activeDataSetP()"          ""
    item    Continuous      command         "Bartlett's test"          	StatMedBartlett           	"activeDataSetP()"          ""
    item    Continuous      command         "One-way ANOVA" StatMedANOVA			"activeDataSetP()"          "packageAvailable('multcomp') && packageAvailable('abind')"
    item    Continuous      command         "Repeated-measures ANOVA" StatMedRepANOVA 	"activeDataSetP()" 			"packageAvailable('multcomp') && packageAvailable('abind')"
    item    Continuous      command         "Multi-way ANOVA" StatMedMultiANOVA	"activeDataSetP()"			"packageAvailable('multcomp') && packageAvailable('abind')"
    item    Continuous      command         "ANCOVA" 	StatMedANCOVA  	"activeDataSetP()"			"packageAvailable('multcomp') && packageAvailable('abind')"
    item    Continuous      command         "Test for Pearson's correlation"			StatMedCorrelation			"activeDataSetP()"       	""
    item    Continuous      command         "Linear regression"            			StatMedLinearRegression    	"activeDataSetP()"          ""

	menu    NonPara         StatMed         ""                                              ""                          ""          				""
    item    StatMed         cascade         "Nonparametric tests "                 	NonPara                  	""          				"" 
    item    NonPara         command         "Mann-Whitney U test"     			StatMedMannW                "activeDataSetP()"          ""
    item    NonPara         command         "Wilcoxon's signed rank test"   StatMedWilSign     			"activeDataSetP()"          ""
    item    NonPara         command         "Kruskal-Wallis test"       	StatMedKruWalli            	"activeDataSetP()"          ""
    item    NonPara         command         "Friedman test"     	StatMedFriedman            	"activeDataSetP()"      	""
    item    NonPara         command         "Jonckheere-Terpstra test"  	StatMedJT	            	"activeDataSetP()"      	"packageAvailable('clinfun')"
    item    NonPara         command         "Spearman's rank correlation test"          	StatMedSpearman             "activeDataSetP()"          ""

    menu    TimeToEvent     StatMed         ""                                              ""                          ""          				""
    item    StatMed         cascade         "Survival analysis"                                	TimeToEvent                 ""          				"" 
    item    TimeToEvent     command         "Kaplan-Meier survival curve and logrank test" 	    	StatMedKaplanMeier    		"activeDataSetP()"          "packageAvailable('survival')"
    item    TimeToEvent     command         "Logrank trend test" 	    StatMedLogrankTrend    		"activeDataSetP()"          "packageAvailable('survival')"
    item    TimeToEvent     command         "Cox proportional hazard regression" 	StatMedCoxRegression    	"activeDataSetP()"          "packageAvailable('survival')"
    item    TimeToEvent     command         "Cox proportional hazard regression with time-dependent covariate" StatMedCoxTD	"activeDataSetP()"          "packageAvailable('survival')"
    item    TimeToEvent     command         "Cumulative incidence of competing events and Gray test" 	StatMedCumInc 			"activeDataSetP()"          "packageAvailable('survival') && packageAvailable('cmprsk')"
    item    TimeToEvent     command         "Fine-Gray proportional hazard regression for competing events" 			StatMedCrr    				"activeDataSetP()"          "packageAvailable('survival') && packageAvailable('cmprsk')"
	
    menu    Test           	StatMed         ""                                            	""                          ""          				""
    item    StatMed        	cascade        	"Accuracy of diagnostic test"                          	Test                    	""          				"" 
    item    Test           	command         "Accuracy of qualitative test"                 	StatMedTest                	""          				""
    item    Test           	command         "Kappa statistics for agreement of two tests"         	StatMedKappa                ""          				""
    item    Test           	command         "Compute positive and negative predictive values"         			StatMedPredictiveValue    	""          				""
    item    Test           	command         "ROC curve analysis for quantitative test"        	StatMedROC                	"activeDataSetP()"          "packageAvailable('pROC')"
    item    Test           	command         "Compare two ROC curves"                       	StatMedROCtest             	"activeDataSetP()"          "packageAvailable('pROC')"
    item    Test 			command         "Cronbach's alpha coefficient for reliability"    StatMedReliability         	"activeDataSetP()"          				""

	menu    MatchedPair     StatMed         ""                                            	""                          ""          				""
    item    StatMed       	cascade         "Matched-pair analysis"              	              	MatchedPair                 ""          				"" 
    item    MatchedPair     command         "Extract matched controls"	                  	StatMedOptMatch             "activeDataSetP()"          "packageAvailable('optmatch')"
    item    MatchedPair     command         "Mantel-Haenzel test for matched proportions"	StatMedMH             		"activeDataSetP()"          ""
    item    MatchedPair     command         "Conditional logistic regression for matched-pair analysis" StatMedCLogistic		"activeDataSetP()"          ""
    item    MatchedPair     command         "Stratified Cox proportional hazard regression for matched-pair analysis"	StatMedStCox		"activeDataSetP()"          ""

    menu    Meta          	StatMed         ""                                            	""                          ""          				""
    item    StatMed       	cascade         "Metaanalysis and metaregression"                            	Meta                    	""          				"" 
    item    Meta           	command         "Metaanalysis and metaregression for proportions"                  	StatMedMeta                	"activeDataSetP()"          "packageAvailable('meta') && packageAvailable('metatest')"
    item    Meta           	command         "Metaanalysis and metaregression for means"                	StatMedMetaCont             "activeDataSetP()"          "packageAvailable('meta') && packageAvailable('metatest')"
    item    Meta           	command         "Metaanalysis and metaregression for hazard ratios"                   	StatMedMetaHazard           "activeDataSetP()"          "packageAvailable('meta') && packageAvailable('metatest')"

    menu    Power           StatMed         ""                                              ""                          ""          				""
    item    StatMed         cascade         "Calculate sample size"                          	Power                    	""          				"" 
    item    Power           command         "Calculate sample size from control and desired response rates"       	StatMedSamplePhaseII       	""          				"packageAvailable('clinfun')"
    item    Power           command         "Calculate sample size from proportion and confidence interval" StatMedSampleProportionsCI ""          				""
    item    Power           command         "Calculate sample size for comparison with specified proportion" 	StatMedSampleProportionsSingle ""						""
    item    Power           command         "Calculate power for comparison with specified proportion"   	StatMedPowerProportionsSingle ""						""
    item    Power           command         "Calculate sample size for comparison between two proportions"             	StatMedSampleProportions    ""          				""
    item    Power           command         "Calculate power for comparison between two proportions"               	StatMedPowerProportions    ""          					""
    item    Power           command         "Calculate sample size for non-inferiority trial of two proportions"     	StatMedSampleProportionsNonInf ""          				""
    item    Power           command         "Calculate sample size from standard deviation and confidence interval" StatMedSampleMeansCI   	""          				""
    item    Power           command         "Calculate sample size for comparison between two means"         	StatMedSampleMeans         	""          				""
    item    Power           command         "Calculate power for comparison between two means"         		StatMedPowerMeans         	""          				""
    item    Power           command         "Calculate sample size for comparison between two paired means"    StatMedSampleMeansPaired    ""          				""
    item    Power           command         "Calculate power for comparison between two paired means"      StatMedPowerMeansPaired     ""          				""
#   item    Power           command         "Calculate sample size for comparison between two survival curves"	StatMedSampleLogrank        ""            				""
    item    Power           command         "Calculate sample size for comparison between two survival curves" 			StatMedSampleHazard 		""          				""
    item    Power           command         "Calculate power for comparison between two survival curves" 			StatMedPowerHazard 			""          				""
	
    menu    StatMedGraph    topMenu         ""                                              ""                          ""          				"" 
    item    topMenu         cascade         "Graphs"                            				StatMedGraph               	""          				"" 
    item    StatMedGraph    command         "Bar graph(Frequencies)"                                  	StatMedBarGraph             "activeDataSetP()"          ""
    item    StatMedGraph    command         "Pie chart(Frequencies)"                                  	StatMedPieChart             "activeDataSetP()"  		"packageAvailable('colorspace')"
    item    StatMedGraph    command         "Stem-and-leaf display" 					                    StatMedStemAndLeaf         	"activeDataSetP()"			"packageAvailable('aplpack')"
    item    StatMedGraph    command         "Histogram"                                  	StatMedHistogram            "activeDataSetP()"          ""
    item    StatMedGraph    command         "Bar graph(Means)"                                	StatMedBarMeans            	"activeDataSetP()" 		  	""
    item    StatMedGraph    command         "Line graph(Means)"                             StatMedPlotMeans            "activeDataSetP()"          ""
    item    StatMedGraph    command         "Line graph(Repeated measures)"                       	StatMedLinePlot             "activeDataSetP()"          ""
    item    StatMedGraph    command         "Boxplot"                                    	StatMedBoxPlot              "activeDataSetP()" 		  	""
    item	StatMedGraph	command			"Dot chart"										StatMedStripChart			"activeDataSetP()"			""
    item	StatMedGraph	command			"Ordered chart"										StatMedOrderedChart			"activeDataSetP()"			""
    item    StatMedGraph    command         "Scatterplot"                                			StatMedScatterPlot          "activeDataSetP()" 			"packageAvailable('car')"
    item    StatMedGraph    command         "Scatterplot matrix"                         			StatMedScatterPlotMatrix    "activeDataSetP()" 			"packageAvailable('car')"
    item    StatMedGraph    command         "Adjusted survival curve"                 	StatMedAdjustedSurvival	    "activeDataSetP()" 			""
    item    StatMedGraph     command         "Stacked cumulative incidences" 	StatMedStackCumInc 			"activeDataSetP()"          "packageAvailable('survival') && packageAvailable('cmprsk')"
    item    StatMedGraph    command         "Graph settings" 			                	StatMedGraphOptions	   	 	"" 							""
    item    StatMedGraph	command         "Graph colors"                            StatMedChangePalette     	""          				""
    item    StatMedGraph    command         "Graph detailed colors"                            	StatMedSetPalette       	""          				""
#    menu    SaveGraphsMenu  StatMedGraph    ""                                              ""                          ""          				""
#    item    StatMedGraph    cascade         "Save graph to file"                            SaveGraphsMenu              ""          				""
#    item    SaveGraphsMenu  command         "as bitmap..."                                  saveBitmap                  "dev.cur() != 1"          	""
#    item    SaveGraphsMenu  command         "as PDF/Postscript/EPS..."                      savePDF                     "dev.cur() != 1"          	""
#    item    SaveGraphsMenu  command         "3D RGL graph..."                               saveRglGraph                "rglLoaded() && 0 != rgl.cur()" "packageAvailable('rgl')"

    menu    ToolsMenu       topMenu         ""                                              ""                          ""          				""
    item    topMenu         cascade         "Tools"                                         ToolsMenu                   ""          				""
    item    ToolsMenu       command         "Load package(s)..."                            loadPackages                ""          				""
    item    ToolsMenu       command         "Load Rcmdr plug-in(s)..."                        loadPlugins             "length(listPlugins()) > 0" ""
    item    ToolsMenu       command         "Options..."                                    Options                     ""          				""

    menu    HelpMenu        topMenu         ""                                              ""                          ""          				""
    item    topMenu         cascade         "Help"                                          HelpMenu                    ""          				""
    item    HelpMenu        command         "Commander help"                                helpCommander               ""          				""
    item    HelpMenu        command         "Introduction to the R Commander"               browseManual                ""          				""
    item    HelpMenu        command         "Help on active data set (if available)"        helpDataSet                 "activeDataSetP()"          ""
    item    HelpMenu        command         "About Rcmdr"                                   helpAboutCommander          ""          				""
    item	HelpMenu		command			"EZR help"										EZRhelp					""							""
    item	HelpMenu		command			"EZR version"									EZRVersion				""							""
	
#Add some of thr original Rcmdr functions
	menu	OriginalMenu	topMenu			""												""							""							""
	item	topMenu			cascade			"Original menu"									OriginalMenu				""							""
    item    OriginalMenu 	command         "Principal-components analysis..."              principalComponents         "numericP(2)"          		""
    item    OriginalMenu 	command         "Factor analysis..."                            factorAnalysis              "numericP(3)"          		""
    item    OriginalMenu	command         "k-means cluster analysis..."                   kmeansClustering            "numericP()"          		""
    item    OriginalMenu	command         "Hierarchical cluster analysis..."              hierarchicalCluster         "numericP()"          		""
    item    OriginalMenu	command         "Summarize hierarchical clustering..."          hclustSummary               "hclustSolutionsP()"       	""
    item    OriginalMenu	command         "Add hierarchical clustering to data set..."    appendHclustGroup           "hclustSolutionsP()"       	""

    item    OriginalMenu  	command         "3D scatterplot..."                             Scatter3D                   "numericP(3)" 				"packageAvailable('rgl')"
    item    OriginalMenu  	command         "Identify observations with mouse"              Identify3D                  "rglLoaded() && 0 != rgl.cur() && !is.null(getRcmdr('Identify3d'))"  "packageAvailable('rgl')"
    item    OriginalMenu  	command         "Save graph to file"                            saveRglGraph                "rglLoaded() && 0 != rgl.cur()" "packageAvailable('rgl')"
    item    OriginalMenu  	command         "as bitmap..."                                  saveBitmap                  "dev.cur() != 1"          	""
    item    OriginalMenu  	command         "as PDF/Postscript/EPS..."                      savePDF                     "dev.cur() != 1"          	""
    item    OriginalMenu  	command         "3D RGL graph..."                               saveRglGraph                "rglLoaded() && 0 != rgl.cur()" "packageAvailable('rgl')"

    item    OriginalMenu	command         "Select active model..."                        selectActiveModel           "modelsP()"          		""
    item    OriginalMenu	command         "Summarize model"                               summarizeModel              "activeModelP()"          	""
    item    OriginalMenu 	command         "Add observation statistics to data..."         addObservationStatistics    "activeModelP()"          	""
    item    OriginalMenu	command         "Confidence intervals..."                       confidenceIntervals         "activeModelP()" 			"packageAvailable('MASS')"
    item	OriginalMenu	command			"Akaike Information Criterion (AIC)"			aic							"activeModelP()"		  	""
    item	OriginalMenu	command			"Bayesian Information Criterion (BIC)"			bic							"activeModelP()"		  	""
    item	OriginalMenu	command			"Stepwise model selection..."					stepwiseRegression			"aicP()" 		 			"packageAvailable('MASS')"
    item	OriginalMenu	command			"Subset model selection..."						subsetRegression			"lmP()"			 			"packageAvailable('leaps')"
    item    OriginalMenu  	command         "ANOVA table..."                                anovaTable                  "activeModelP()" 			"packageAvailable('car')"
    item    OriginalMenu  	command         "Compare two models..."                         compareModels               "modelsP(2)"         		 ""
    item    OriginalMenu 	command         "Linear hypothesis..."                          testLinearHypothesis        "activeModelP()" 			"packageAvailable('car')"
    item    OriginalMenu 	command         "Variance-inflation factors"                    VIF                         "(lmP() || glmP())" 		"packageAvailable('car')"
    item    OriginalMenu 	command         "Breusch-Pagan test for heteroscedasticity..."  BreuschPaganTest            "lmP()" 					"packageAvailable('lmtest')"
    item    OriginalMenu 	command         "Durbin-Watson test for autocorrelation..."     DurbinWatsonTest            "lmP()" 					"packageAvailable('lmtest')"
    item    OriginalMenu 	command         "RESET test for nonlinearity..."                RESETtest                   "lmP()" 					"packageAvailable('lmtest')"
    item    OriginalMenu 	command         "Bonferroni outlier test"                       OutlierTest                 "(lmP() || glmP())" 		"packageAvailable('car')"
    item    OriginalMenu	command   		"Basic diagnostic plots"                        plotModel                   "lmP() || glmP()"          	""
    item    OriginalMenu	command   		"Residual quantile-comparison plot..."          residualQQPlot              "lmP()" 					"packageAvailable('car')"
    item    OriginalMenu	command   		"Component+residual plots"                      CRPlots                     "(lmP() || glmP())" 		"packageAvailable('car')"
    item    OriginalMenu	command   		"Added-variable plots"                          AVPlots                     "(lmP() || glmP())" 		"packageAvailable('car')"
    item    OriginalMenu	command   		"Influence plot"                                InfluencePlot               "(lmP() || glmP())" 		"packageAvailable('car')"
    item    OriginalMenu	command   		"Effect plots"                                  effectPlots                 "(lmP() || glmP()) || polrP() || multinomP()" "packageAvailable('effects')"

#Remove original Rcmdr topMenu items
    remove    fileMenu        topMenu         ""                                              ""                          ""          ""
    remove    editMenu        topMenu         ""                                              ""                          ""          ""
    remove    dataMenu        topMenu         ""                                              ""                          ""          ""
    remove    statisticsMenu  topMenu         ""                                              ""                          ""          ""
    remove    graphsMenu      topMenu         ""                                              ""                          ""          ""
    remove    modelsMenu      topMenu         ""                                              ""                          ""          ""
    remove    distributionsMenu topMenu       ""                                              ""                          ""          ""
    remove    toolsMenu       topMenu         ""                                              ""                          ""          ""
    remove    helpMenu        topMenu         ""                                              ""                          ""          ""