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)

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

Value

MenuItem

See Also

jgr.addMenu jgr.addMenuSeparator

Examples

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 )))

[Package JGR version 1.6-3 Index]