deducer.addmenu: Controls Deducer's command line menus

Description Usage Arguments Examples

Description

Controls Deducer's command line menus

Usage

1
2
3
4
5
deducer.addMenu(name, pos=length(menus)+1)
deducer.setMenus(newMenus)
deducer.getMenus()
deducer.addMenuItem(name, pos=NULL, command, menuName, silent=TRUE)
menuFunctions()

Arguments

name

name of item or menu to add

pos

position at which to add the item or menu

menuName

the name of the menu to add the item to

command

A character vector representing the R command to be run

silent

Should the command be executed silently

newMenus

new menus

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#add a menu with two items
deducer.addMenu("TestMenu")
deducer.addMenuItem("test1",,"cat('test1 selected')","TestMenu")
deducer.addMenuItem("test2",,"print(summary(lm(rnorm(100)~rnorm(100))))","TestMenu")

#Add menu to gui if applicable
if(.windowsGUI){
	winMenuAdd("TestMenu")
	winMenuAddItem("TestMenu", "test1", "cat('test1 selected')")
	winMenuAddItem("TestMenu", "test2", "print(summary(lm(rnorm(100)~rnorm(100))))")
}else if(.jgr){
	jgr.addMenu("TestMenu")
	jgr.addMenuItem("TestMenu", "test1", "cat('test1 selected')")
	jgr.addMenuItem("TestMenu", "test2", "print(summary(lm(rnorm(100)~rnorm(100))))")	
}

Deducer documentation built on May 2, 2019, 8:35 a.m.