
Last chance! 50% off unlimited learning
Sale ends in
Commander()
use.knitr
option below).
Some Control
key, though the
latter works as well.
Right-clicking the mouse (clicking button 3 on a three-button mouse, or Control-left-clicking) in the tabs or windows brings up
a "context" menu with the Edit-menu items, plus (in the Script, R Markdown, and knitr tabs) a Submit item.
You can open a larger editor window with the document in the Markdown or knitr
tab by making the corresponding selection from the Edit menu, the right-click
context menu when the cursor is in the tab, or by pressing Control-E when the
cursor is in the tab.
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.
Pressing a letter key (e.g., "a") in a list box will scroll the list box to bring the next entry
starting with that letter to the top of the box.
You can cancel an R Commander dialog box by pressing the Esc key.
Most R Commander dialogs remember their state when this is appropriate, and can be restored to pristine state by pressing the Reset button.
Some R Commander dialogs have an Apply button that will execute the command generated by the dialog and then re-open the dialog in its previous state.
Exit from the Commander via the File -> Exit menu or by closing the Commander window.
Customization and Configuration
The preferred way of customizing the R Commander is to write a plug-in package:
see help("Plugins")
.
Alternatively, configuration files reside in the etc
subdirectory of the package,
or in the locations given by the etc
and etcMenus
options (see below).
The Rcmdr-menus.txt
.
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. Alternatively, you can edit
the source package and recompile it.
To reiterate, however, the preferred procedure is to write an R Commander plug-in package.
A number of functions are provided to assist in writing dialogs, and help("Rcmdr.Utilities")
and the manual supplied in the doc
directory of 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],[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],[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],[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]
Some options can also be set via the File -> Options menu, which will restart the Commander after options are set.
If you want always to launch the R Commander when R starts up, you can include the following code in one of R's start-up
files (e.g., in the Rprofile.site
file in R's etc
subdirectory):
local({
old <- getOption("defaultPackages")
options(defaultPackages = c(old, "Rcmdr"))
})
R Commander options can also be permanently set in the same manner.
For more information about R initialization, see ?Startup
.knit
, knit2pdf
options(Rcmdr=list(log.font.size=12, default.contrasts=c("contr.Sum", "contr.poly")))
Run the code above in your browser using DataLab