Commander               package:Rcmdr               R Documentation

_R _C_o_m_m_a_n_d_e_r

_D_e_s_c_r_i_p_t_i_o_n:

     Start the R Commander GUI (graphical user interface)

_U_s_a_g_e:

     Commander()

_D_e_t_a_i_l_s:

     *Getting Started*

     Commands to read, write, transform, and analyze data are entered
     using the menus in the menu bar at the top of the _Commander_
     window. Most menu items lead to dialog boxes requesting further
     specification. I suggest that you explore the menus to see what is
     available.

     Below the menu bar is an information field displaying the name of
     the active data set; buttons for editing and displaying the active
     data set in the R data editor; and check boxes for logging
     commands and attaching the active data set to the R search path.
     The information field for the active data set is actually a button
     that can be used to select the active data set from data frames in
     memory.

     By default, commands are logged to the log/script window (the
     large, initially empty window immediately below), and the active
     data set is attached to the search path. Below the log window is
     an information field showing the active statistical model, and a
     _Submit_ button for re-executing commands in the log window. The
     information field for the active model is a button that can be
     used to select the active model from among linear and generalized
     linear model objects in memory.

     Almost all commands require an active data set. When the Commander
     starts, there is no active data set, as indicated in the data set
     information field. A data set becomes the active data set when it
     is read into memory from an R package or imported from a text
     file, SPSS data set, or Minitab data set. In addition, the active
     data set may be selected from among R data frames resident in
     memory. You may therefore switch among data sets during a session.

     Some '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:

     '_l_o_g._f_o_n_t._s_i_z_e' The font size, in points, to be used in the
          log/script window, in recode dialogs, and in compute
          expressions - that is, where a monospaced font is used.  The
          default is 10.

     '_l_o_g._w_i_d_t_h' The width of the log window, in characters. The
          default is 70.

     '_l_o_g._h_e_i_g_h_t' The height of the log window, in lines. The default
          is 15.

     '_p_l_a_c_e_m_e_n_t' Placement of the Commander window, in pixels; the
          default is '"-40+40"', which puts the window near the
          upper-right corner of the screen.

     '_c_o_n_t_r_a_s_t_s' Serves the same function as the general 'contrasts'
          option; the default is  'c("contr.Treatment", "contr.poly")'.
          When the Commander exits, the 'contrasts' option is returned
          to its pre-existing value. Note that 'contr.Treatment' is
          from the 'car' package.

     '_g_r_a_b._f_o_c_u_s' Set to 'TRUE' (the default) for the current Tk window
          to  "grab" the focus - that is, to prevent the focus from
          being changed to another Tk window. On some systems, grabbing
          the focus in this manner apparently causes the OK, Cancel,
          and Help buttons to be disabled after the user types in a
          text field. If you experience this problem, set the
          'grab.focus' option to 'FALSE'.

     '_d_o_u_b_l_e._c_l_i_c_k' Set to 'TRUE' if you want a double-click of the
          left mouse button to press the default button in all dialogs.
          The default is 'FALSE'.

     '_s_o_r_t._n_a_m_e_s' Set to 'TRUE' (the default) if you want variable
          names to be sorted alphabetically in variable lists.

     '_s_h_o_w._e_d_i_t._b_u_t_t_o_n' Set to 'TRUE' (the default) if you want an Edit
          button in the Commander window, permitting you to edit the
          active data set. Windows users may wish to set this option to
          'FALSE' to suppress the Edit button because changing variable
          names in the data editor can cause R to crash.

     '_s_c_a_l_e._f_a_c_t_o_r' A scaling factor to be applied to all Tk elements,
          such as fonts. This works well only in Windows. The default
          is 'NULL'.

     '_d_e_f_a_u_l_t._f_o_n_t._s_i_z_e' The size, in points, of the default font. The
          default is 10. Unless otherwise  specified (see the next
          item), the default font is
          '"*helvetica-medium-r-normal-*-xx*"', where 'xx' is the
          default font size. This option is only for non-Windows
          systems.

     '_d_e_f_a_u_l_t._f_o_n_t' The default font, as an X11 font specification,
          given in a character string.  If specified, this value takes
          precedence over the default font size (above). This option is
          only for non-Windows systems.

     '_t_k_w_a_i_t' This option addresses a problem that, to my knowledge, is
          rare,  and may occur on some non-Windows systems. If the
          Commander causes R to hang,  then set the 'tkwait' option to
          'TRUE'; otherwise set the option to 'FALSE' or ignore it.  An
          undesirable side effect of setting the 'tkwait' option to
          'TRUE' is that the R session command prompt is suppressed
          until the Commander exits. One can still enter commands via
          the log/script window, however. In particular, there is no
          reason to use this option under Windows, and it should not be
          used with the Windows R GUI with buffered output.

     Most options may also be set via the emph{File -> Options} menu,
     which will restart the Commander after options are set.

_A_u_t_h_o_r(_s):

     John Fox jfox@mcmaster.ca

_E_x_a_m_p_l_e_s:

         options(Rcmdr=list(log.font.size=12, contrasts=c("contr.Sum", "contr.poly")))
         

