Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more ➡
Download
Standard view
Full view
of .
Add note
Save to My Library
Sync to mobile
Look up keyword
Like this
7Activity
×
0 of .
Results for:
No results containing your search query
P. 1
R commander paper

R commander paper

Ratings: (0)|Views: 3,347|Likes:
Published by moosavy
یک مقاله برای معرفی نرم افزار R commander
یک مقاله برای معرفی نرم افزار R commander

More info:

Published by: moosavy on Aug 24, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See More
See less

02/01/2013

pdf

text

original

JSS
Journal of Statistical Software
September 2005, Volume 14, Issue 9.
http://www.jstatsoft.org/
TheR Commander: A Basic-Statistics Graphical
User Interface toR
John Fox
McMaster University
Abstract

UnlikeS-PLUS,R does not incorporate a statistical graphical user interface (GUI), but it does include tools for building GUIs. Based on thetcltk package (which furnishes an interface to theTcl/Tk GUI toolkit), theRcmdr package provides a basic-statistics graphical user interface toR called the \u201cR Commander.\u201d The design objectives of the

RCommander were as follows: to support, through an easy-to-use, extensible, cross-

platform GUI, the statistical functionality required for a basic-statistics course (though its current functionality has grown to include support for linear and generalized-linear models, and other more advanced features); to make it relatively di\ufb03cult to do unrea- sonable things; and to render visible the relationship between choices made in the GUI and theR commands that they generate. TheR Commander uses a simple and familiar menu/dialog-box interface. Top-level menus includeFile,Edit,Data,Statistics,Graphs,

Models, Distributions, Tools, and Help, with the complete menu tree given in the paper.

Each dialog box includes aHelp button, which leads to a relevant help page. Menu and dialog-box selections generateR commands, which are recorded in a script window and are echoed, along with output, to an output window. The script window also provides the ability to edit, enter, and re-execute commands. Error messages, warnings, and some other information appear in a separate messages window. Data sets in theR Commander are simplyR data frames, and can be read from attached packages or imported from \ufb01les. Although several data frames may reside in memory, only one is \u201cactive\u201d at any given time. There may also be an active statistical model (e.g., anRlm orglm object). The purpose of this paper is to introduce and describe the use of theR Commander GUI; to describe the design and development of theR Commander; and to explain how theR Commander GUI can be extended. The second part of the paper (following a brief introduction) can serve as an introductory guide for students who will use theR Commander

Keywords: statistical GUI, statistical software, statistical education,R language.
2
TheR Commander: A Basic-Statistics GUI toR
1. Background and motivation
R(Ihaka and Gentleman 1996;RCore Development Team 2004) is a free, open-source im-

plementation of theS statistical computing language and programming environment.R is a command-driven system: One normally speci\ufb01es a statistical analysis inR by typing commands\u2014that is, statements in theS language that are executed by theR interpreter.

S-PLUS(a commercial implementation of the Slanguage), also incorporates a graphical user
interface (GUI) to much of its statistical functionality.

In my opinion, a GUI for statistical software is a mixed blessing: On the one hand, a GUI does not require that the user remember the names and arguments of commands, and decreases the chances of syntax and typing errors. These characteristics make GUIs particularly attractive for introductory, casual, or infrequent use of software.

On the other hand, having to drill one\u2019s way through successive layers of menus and dialog boxes can be tedious and can make it di\ufb03cult to reproduce a statistical analysis, perhaps with variations. Moreover, providing a GUI for a statistical systemthat includes hundreds (or even thousands) of commands, many incorporating extensive options, can produce a labyrinth. The

RCommander GUI described in this paper is not immune to these problems, but I have tried
to keep things relatively simple, and to render visible, in a reusable form, theR commands
that the GUI generates.

UnlikeS-PLUS,R does not include a statistical GUI, but it does furnish tools for build- ing GUIs.1 TheRcmdr package provides a basic-statistics GUI forR, which I call the \u201cR Commander.\u201d The design objectives of theR Commander were as follows:

\u2022Most importantly, to provide, through an easy-to-use, cross-platform, extensible GUI,

the statistical functionality required for a basic-statistics course.2 The original target text was David Moore\u2019sThe Basic Practice of Statistics, Second Edition (Moore 2000). With the help of a research assistant (Tony Christensen), I have since examined several other texts, including the third edition ofMoore (2004), collected suggestions from a number of individuals, and slightly expanded the horizons of theR Commander\u2014for example, to include linear and generalized-linear models.

\u2022To make it relatively di\ufb03cult to do unreasonable things (such as calculating the mean
of a categorical variable).
\u2022To render visible the relationship between choices made in the GUI and theR commands

that they generate. Commands are both pasted into a script window in theR Com- mander and echoed to an output window (see below). The script window is editable, commands in the window can be executed or re-executed, and new commands can be entered by typing directly in the window. Scripts can also be saved to, and loaded from, \ufb01les.

1TheR Commander, described in this paper, is based on thetcltk package (Dalgaard 2001,2002), which
provides an interface toTcl/Tk (Welch 2000).
2The examples in this document use the Windows version ofR, and parts of the document are speci\ufb01c to

the Windows version.R, however, is available on other computing platforms as well (Macintosh computers and Unix/Linux systems), and the use ofR and theR Commander on these other systems is very similar to their use under Windows. I focus here on the Windows version of the software because I believe that the large majority of students in basic-statistics classes are Windows users.

Journal of Statistical Software
3

One purpose of this paper is to introduce and describe the basic use of theR Commander GUI. In particular, Section 2 of the paper can serve as an introductory guide for students who will use theR Commander. Section 3 describes the design and development of theR Commander; informally assesses the extent to which it has met its goals; and suggests future directions for the project. Section 4 explains how theR Commander can be extended. The \ufb01nal section provides some information for instructors. In addition, the help \ufb01les for the current version of theRcmdr package are available on the ComprehensiveR Archive Network (CRAN) website athttp://CRAN.R-project.org/doc/packages/Rcmdr.pdf.

2. Using theR Commander
2.1. Starting theR Commander
OnceR is running, simply loading theRcmdr package by typing the command
library("Rcmdr")into theR Console starts theR Commander GUI. To function prop-
erly under Windows, theR Commander requires the single-document interface (SDI) toR.3
After loading the package, theR Commander window should appear more or less as in Figure
1. This 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 di\ufb00er.4
TheR Commander andR Console windows \ufb02oat freely on the desktop. You will normally
use the menus and dialog boxes of theR Commander to read, manipulate, and analyze data.
\u2022Rcommands generated by the RCommander GUI appear in the upper text window
(labelledScript Window ) within the mainR Commander window. You can also type
Rcommands directly into the script window or at the> (greater-than) prompt in the
R Console; the main purpose of theR Commander, however, is to avoid having to type
commands.
3The Windows version ofR is normally run from a multiple-document interface (MDI), which contains theR
Consolewindow, Graphical Devicewindows created during the session, and any other windows related to theR

process. In contrast, under the single-document interface (SDI), theR Console andGraphical Device windows are not contained within a master window. There are several ways to runR in SDI mode\u2014for example, by editing theRconsole \ufb01le inR\u2019setc subdirectory, or by adding--sdi to theTarget \ufb01eld in theShortcut tab of theR desktop icon\u2019sProperties. This limitation of theRcmdr package is inherited from thetcltk package, on whichRcmdr depends.

4TheRcmdr requires some packages in addition to several of the \u201crecommended\u201d packages that are normally
distributed withR, and loads these packages at startup.Rcmdr, the required packages, and many other
contributed packages are available for download from CRAN athttp://CRAN.R- project.org/.
If these packages are not installed, theRcmdr will o\ufb00er to install them from the Internet or from local \ufb01les
(e.g., on a CD/ROM). If you install theRcmdr package via the Windows \u201cR GUI,\u201d the packages on which the
Rcmdrdepends should be installed automatically. More generally, you can install the Rcmdrpackage and all
of the packages on which it depends via theinstall.packages function, setting the argumentdependencies
= TRUE.
Thanks to Dirk Eddelbuettel, Debian Linux users need only issue the command$ apt-get install r-cran-
rcmdrto install theRcmdr package along with all of the packages that it requires. In any event, building and

installing theRcmdr package on Linux systems is typically straightforward. The task can be more formidible under OS/X on Macintosh systems, since thetcltk package on which theRcmdr depends requires thatTcl/Tk be installed and thatR is running under X-Windows. Detailed installation instructions for Macintosh (and other) users are available athttp://socserv.socsci.mcmaster.ca/jfox/Misc/Rcmdr/installation-notes.html.

Activity (7)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
gjohnson7109 liked this
karisalk liked this
karisalk liked this
loveyouoklove liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->