jgr.addMenuItem: New JGR Console MenuItem

View source: R/JGR.R

jgr.addMenuItemR 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 )))

JGR documentation built on May 31, 2023, 8:55 p.m.

Related to jgr.addMenuItem in JGR...