Previous Topic

Next Topic

Book Contents

Book Index

Command Layout

The command window provides a graphic user interface for developing and executing R commands and scripts. The illustration below shows the organization using the horizontal layout.

RConsole1

Commands Area

The Commands area serves the following purposes:

  1. Interactive R command execution: R commands can be manually typed into the are and executed with the button. If multiple code lines were entered, execution can be restricted to a highlighted part by the button.
  2. Code generated by Scripts: Whenever a scripts is called, its R code is copied to the Commands area and then executed.
  3. Execution history: Whenever the Commands contents is executed, it is copied to a history butter. If the Auto-clear box is checked, the Command area is cleared after command execution. However, using the keyboard keys Ctrl+up-arrow and Ctrl+down-arrow, prior execution code can be retrieved from the history for inspection/modification. For users interested in R it may be of interest to recall and review the code of in-built scripts.

Output Area

The

Connecting to the server localhost ... Connected.
Loading default settings ... Loaded.
R version 2.15.3 (2013-03-01)
Loading input data 1/2... Loaded.
Loading input data 2/2... Loaded.

> summary(g1);
Length Class Mode
vt 16 data.frame list

> ls();
[1] "g1" "g2" "pm.getc" "pm.gete" "pm.getf"
[6] "pm.geti" "pm.getm" "pm.getp" "pm.getr" "pm.getslc"
[11] "pm.getv" "pm.getx" "pm.mutualc" "pm.mutualr" "pm.mutualrc"
[16] "pm.setc" "pm.setm" "pm.setp" "pm.setr" "pm.setslc"
[21] "pm.size" "pm.sortc" "pm.sortr" "pm.sortrc" "pm.trim"
[26] "zz"

Errors Area

Please check the contents of the Errors area, if the behavior of the R console is unexpected.

PMOD R Commands and Code Generator

PMOD has implemented a set of commands dedicated to the PMOD Command console. This commands list is accessible typing the pm. in the Command console. Their description is available upon selection from the pop-up menu as shown below:

RCommandPM

RCommandToolbarData

Creation of new data structures such as vector, array or list

RCommandWindowDataSelection

RCommandToolbarMatrix

Basic operations on matrices.

RCommandToolbarMatrixSelection

RCommandToolbarStat

Allows applying predefined statistic operations to the variables available in the workspace.

RCommandToolbarStatLIst

RCommand_ToolbarWorkspace

Allows performing various quick operation like listing (ls()), removing(rm()) and accessing the summary (summary()) of the variables available in the workspace. The results are displayed in the Output console.

RConsole_Command_Workspace

RCommandToolbar_EditVariable

Allows editing a variable available in the workspace. Upon activation the list of variables available in the workspace is displayed. The data type is detected automatically. Two options are available: either Choose variable or Define expression.

RCommandToolbar_EditVar_Eg

The user can decide which Part of the selected variable has to be edited: Name, Time or Value. The confirmation of the settings opens a dialog window which allows perfroming the editing.

RCommandToolbarSCripts

Allows selecting and running general predefined R scripts. Detailed information of the scripts is available in the dedicated section in this documentation.

The predefined scripts are available for selection with the small arrow closed to the button. To add a R script to the predefined list, please copy the *.r file in the Pmod installation folder in C:\Pmod3.6resources\extlibs\r

RCommandToolbarScriptsSelection

If any help section was included in the script this can be visualized activating the ? icon close to the scripts selection list.

RInterfaceClearWorkspace

Allows deleting a script from the scripts predefined list.

RCommandToolbarLayout

Allows switching between the two layout options: horizontal and vertical.

RCommandToolbarLayoutSelection

RComment

Allows commenting the command lines. First, the lines have to be selected and the icon activated.

RCommentEg

RUncomment

Allows uncommenting the selected command lines in the command console. First, the lines have to be selected and the icon activated.

RCommandToolbar_CopyButton

In the Commands console: allows copying commands console to the clipboard.

In the Output console: allows copying output content to clipboard.

In the Errors console: allows copying the errors messages to the clipboard.

R CommentDelete

In the Commands console: allows deleting the content of the command console.

In the Output console: allows clearing the output content .

In the Errors console: allows deleting the errors messages.