Last data update: 2014.03.03

R: New JGR Console sub-menu
jgr.addSubMenuR Documentation

New JGR Console sub-menu

Description

adds a sub-menu to a Menu in JGR Console

Usage

jgr.addSubMenu(menu, subMenuName, labels, commands)
jgr.insertSubMenu(menu, subMenuName, labels, commands,index)

Arguments

menu

name of the menu to add this sub-menu to

subMenuName

name of the sub-menu

labels

a character vector of menu items

commands

a character vector of commands to be exectued

index

index at which to insert

Value

Menu

See Also

jgr.addMenu jgr.addMenuItem

Examples

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

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(JGR)
Loading required package: rJava
Loading required package: JavaGD
Loading required package: iplots

Please type JGR() to launch console. Platform specific launchers (.exe and .app) can also be obtained at http://www.rforge.net/JGR/files/.


> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/JGR/jgr.addSubMenu.Rd_%03d_medium.png", width=480, height=480)
> ### Name: jgr.addSubMenu
> ### Title: New JGR Console sub-menu
> ### Aliases: jgr.addSubMenu jgr.insertSubMenu
> ### Keywords: programming
> 
> ### ** Examples
> 
> jgr.addMenu("added menu")
jgr.addMenu() cannot be used outside JGR.
> jgr.addMenuItem("added menu", "print 1","print(1)")
jgr.addMenuItem() cannot be used outside JGR.
> jgr.insertMenuItem("added menu","print 1 as if entered in console","print(1)",1,FALSE)
jgr.insertMenuItem() cannot be used outside JGR.
> jgr.addMenuSeparator("added menu")
jgr.addMenuSeparator() cannot be used outside JGR.
> jgr.addSubMenu("added menu","sub menu",c("a","b","c"),c("print('a')","print('b')","print('c')"))
jgr.addSubMenu() cannot be used outside JGR.
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>