jgr.addMenuItem {JGR} | R Documentation |
New JGR Console MenuItem
Description
adds a new MenuItem to specified JGR Console Menu
Usage
jgr.addMenuItem(menu,name,command,silent=TRUE)
jgr.insertMenuItem(menu,name,command,index,silent=TRUE)
Arguments
menu |
Name of the menu that this item will be added to |
name |
Name of the menu item to add |
command |
R expression(s) as a string to be parsed and evaluated or a function that will be called (without arguments) when the menu item is selected |
index |
index at which to insert |
silent |
If FALSE, executes as if entered into the cons |
Value
MenuItem
See Also
jgr.addMenu
jgr.addMenuSeparator
Examples
jgr.addMenu("Workspace")
jgr.addMenuItem("Workspace","Browse","ls()",FALSE)
jgr.addMenuSeparator("Workspace")
jgr.addMenuItem("Workspace","List Functions",
function() unlist(lapply(ls(envir=.GlobalEnv),
function(x) if (is.function(get(x))) x else NULL )))
[Package JGR version 1.9-2 Index]