Getting started with the r commander

Páginas: 24 (5827 palabras) Publicado: 3 de abril de 2011
Getting Started With the R Commander∗
John Fox 26 August 2006

1

Starting the R Commander

Once R is running, simply loading the Rcmdr package by typing the command library(Rcmdr) into the R Console starts the R Commander graphical user interface (“GUI”). To function properly under Windows, the R Commander requires the single-document interface (SDI) to R.1 After loading the package, RConsole and R Commander windows should appear more or less as in Figures 1 and 2. These and other screen images in this document were created under Windows XP; if you use another version of Windows (or, of course, another computing platform), then the appearance of the screen may differ.2 The R Commander and R Console windows float freely on the desktop. You will normally use the menus and dialogboxes of the R Commander to read, manipulate, and analyze data. • R commands generated by the R Commander GUI appear in the upper text window (labelled Script Window ) within the main R Commander window. You can also type R commands directly into the script window or at the > (greater-than) prompt in the R Console; the main purpose of the R Commander, however, is to avoid having to type commands. •Printed output appears by default in the second text window (labelled Output Window ). • The lower, gray window (labelled Messages) displays error messages, warnings, and some other information (“notes”), such as the start-up message in Figure 2. • When you create graphs, these will appear in a separate Graphics Device window.

manual is adapted and updated from Fox (2005). Please addresscorrespondence to jfox@mcmaster.ca. Windows version of R is normally run from a multiple-document interface (“MDI”), which contains the R Console window, Graphical Device windows created during the session, and any other windows related to the R process. In contrast, under the single-document interface (“SDI”), the R Console and Graphical Device windows are not contained within a master window. There areseveral ways to run R in SDI mode – for example, by editing the Rconsole file in R’s etc subdirectory, or by adding --sdi to the Target field in the Shortcut tab of the R desktop icon’s Properties. This limitation of the Rcmdr package is inherited from the tcltk package, on which Rcmdr depends. 2 Notice that Rcmdr requires some packages in addition to several of the “recommended” packages that arenormally distributed with R, and loads these packages at startup. Rcmdr, the required packages, and many other contributed packages are available for download from the Comprehensive R Archive Network (CRAN) at . If these packages are not installed, the Rcmdr will offer to install them from the Internet or from local files (e.g., on a CD/ROM). If you install the Rcmdr package via the Windows “R GUI,”the packages on which the Rcmdr depends should be installed automatically. More generally, you can install the Rcmdr package and all of the packages on which it depends via the install.packages function, setting the argument dependencies = TRUE. Thanks to Dirk Eddelbuettel, Debian Linux users need only issue the command $ apt-get install r-cran-rcmdr to install the Rcmdr package along with all ofthe packages that it requires. In any event, building and installing the Rcmdr package on Linux systems is typically straightforward. The task can be more formidible under OS/X on Macinstosh systems, since the tcltk package on which the Rcmdr depends requires that Tcl/Tk be installed and that R is running under X-Windows. To enable 3D graphics in the Rcmdr, install the rgl package. Additionalinformation about installation is available at the R Commander web page, .
1 The

∗ This

1

Figure 1: The R Console window after loading the Rcmdr package. There are several menus along the top of the R Commander window: File Menu items for loading and saving script files; for saving output and the R workspace; and for exiting. Edit Menu items (Cut, Copy, Paste, etc.) for editing the...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Getting Started With Cubby
  • Getting started
  • Getting started with your guitar
  • Getting Started With Data Warehouse
  • Getting started with alfresco shared
  • Step-By-Step Guide To Getting Started With Hyper-V
  • Camtasia Getting Started Guide
  • Dropbox: Getting Started

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS