jgr.addMenu {JGR}R Documentation

New JGR Console Menu

Description

adds a new Menu to MenuBar in JGR Console

Usage

jgr.addMenu(name)
jgr.insertMenu(name, index)

Arguments

name

Menu name

index

index at which to insert

Value

Menu

See Also

jgr.addMenuItem jgr.addMenuSeparator

Examples

jgr.addMenu("Workspace")
jgr.addMenuItem("Workspace","Browse","ls()")
jgr.addMenuSeparator("Workspace")
jgr.addMenuItem("Workspace","Browse (pos=2)","ls(pos=2)")


menus <- jgr.getMenuNames()
index <- which(menus=="Packages & Data")
if(length(index)==0) index <- 1

jgr.insertMenu("User menu", index)
jgr.addMenuItem("User menu", "Good place for user generated menus is",
                "print('before Packages & Data')")

[Package JGR version 1.9-2 Index]