Commander()
Rcmdr
dialogs (those in the Statistics -> Fit models menu)
produce linear or generalized
linear models. When a model is fit, it becomes the active model, as indicated in the information
field at the lower-left of the Commander window.
Items in the Models menu apply to the active model. Initially, there is no active model.
If there are several models in memory, you may select the active model from among them.
If command logging in turned on, R commands that are generated from the menus and dialog boxes are
entered into the log/script window in the Commander. You can edit these commands in the normal
manner and can also type new commands into the log/script window. The contents of the log
window can be saved during or at the end of the session, and a saved log can be loaded into the
log window.
To re-execute a command or set of commands, select the lines to be executed using
the mouse and press the Submit button at the lower-right of the Commander window
(or Control-R, for "run"). If no text is selected, the Submit button (or Control-R)
submits the line containing the text-insertion cursor.
Pressing Control-F brings up a find-text dialog box (which may also be accessed via
Edit -> Find) to search for text in the log/script window.
Right-clicking the mouse (clicking button 3 in a three-button mouse) in the log/script window brings up
a "context" menu with the Edit-menu items, plus a Submit item.
When you
execute commands from the Commander window, you must ensure that the sequence of commands
is logical. For example, it makes no sense to fit a statistical model to a data set that has
not been read into memory. Commands generated by the Commander or executed from the log window
appear in the R session window with an "R-cmdr>
" prefix.
Exit from the Commander via the File -> Exit menu or by closing the Commander window.
Customization and Configuration
Configuration files reside in the etc
subdirectory of the package.
The Rcmdr
menus may be customized by editing the file Rcmdr-menus.txt
.
Some functions (e.g., hist
) that do not normally create visible printed output when executed
from the command prompt will do so --- unless prevented --- when executed from the
Commander log window. Such output
can be suppressed by listing the names of these functions in the log-exceptions.txt
file.
You can add R code to the package, e.g., for creating additional dialogs, by placing files with
file type .R
in the etc
directory, also editing Rcmdr-menus.txt
to provide
additional menus, sub-menus, or menu-items. A demo addition is provided in the file
compareModels.demo
. To activate the demo, rename this file to compareModels.R
,
and uncomment the corresponding menu line in Rcmdr-menus.txt
. Alternatively, you can edit
the source package and recompile it.
The following functions are provided to assist in writing dialogs: activeDataSet
,
activeModel
, doItAndPrint
, justDoIt
, listDataSets
,
listGeneralizedLinearModels
, listLinearModels
, logger
. The following global
variables contain information about variables in the active data set: .factors
,
.numeric
, .twoLevelFactors
, .variables
. See help(Rcmdr.Utilities)
for more information.
In addition, several features are controlled by run-time options, set via the options("Rcmdr")
command. These options should be set before the package is loaded. If the options are unset, which is
the usual situation, defaults are used. Specify options as a list of name=value pairs. You can
set none, one, several, or all options. The available options are as follows:
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Most options may also be set via the emph{File -> Options} menu, which will restart the Commander after options are set.options(Rcmdr=list(log.font.size=12, contrasts=c("contr.Sum", "contr.poly")))
Run the code above in your browser using DataLab