Learn R Programming

JGR (version 1.9-2)

jgr.removeMenu: remove JGR Console menus

Description

removes a menu / menu item

Usage

jgr.removeMenu(index)
jgr.removeMenuItem(menu,index)

Arguments

menu

name of the menu

index

index of the item to remove

See Also

jgr.addMenu jgr.addMenuItem

Examples

Run this code
jgr.addMenu("added menu")
jgr.addMenuItem("added menu", "print 1","print(1)")
jgr.insertMenuItem("added menu","print 1 as if entered in console","print(1)",1,FALSE)
jgr.addMenuSeparator("added menu")
jgr.addSubMenu("added menu","sub menu",c("a","b","c"),c("print('a')","print('b')","print('c')"))

jgr.removeMenuItem("added menu",1)
jgr.removeMenu(length(jgr.getMenuNames()))

Run the code above in your browser using DataLab