jgr.addMenuItem {JGR} | R Documentation |
adds a new MenuItem to specified JGR Console Menu
jgr.addMenuItem(menu,name,command)
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 |
MenuItem
jgr.addMenu
jgr.addMenuSeparator
jgr.addMenu("Workspace") jgr.addMenuItem("Workspace","Browse","ls()") jgr.addMenuSeparator("Workspace") jgr.addMenuItem("Workspace","List Functions", function() unlist(lapply(ls(envir=.GlobalEnv), function(x) if (is.function(get(x))) x else NULL )))