[IPSUR-commits] r124 - pkg/IPSUR/inst/doc
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jan 5 22:15:59 CET 2010
Author: gkerns
Date: 2010-01-05 22:15:56 +0100 (Tue, 05 Jan 2010)
New Revision: 124
Modified:
pkg/IPSUR/inst/doc/IPSUR.Rnw
pkg/IPSUR/inst/doc/IPSUR.bib
Log:
too many changes
Modified: pkg/IPSUR/inst/doc/IPSUR.Rnw
===================================================================
--- pkg/IPSUR/inst/doc/IPSUR.Rnw 2010-01-05 16:14:53 UTC (rev 123)
+++ pkg/IPSUR/inst/doc/IPSUR.Rnw 2010-01-05 21:15:56 UTC (rev 124)
@@ -23,6 +23,7 @@
\usepackage{url}
\usepackage{amsthm}
\usepackage{amsmath}
+\makeindex
\usepackage{setspace}
\usepackage{amssymb}
\setstretch{1.2}
@@ -689,6 +690,24 @@
menu item, next click the \textsf{Summaries} submenu item, and finally
click \textsf{Active Dataset}.
+
+\section*{Acknowledgements}
+
+This book would not have been possible without the firm mathematical
+and statistical foundation provided by the professors at Bowling Green
+State University, including Drs.~G\'{a}bor Sz\'{e}kely, Craig Zirbel,
+Arjun K.~Gupta, Hanfeng Chen, Truc Nguyen, and James Albert. I would
+also like to thank Drs.~Neal Carothers and Kit Chan.
+
+I would also like to thank my colleagues at Youngstown State University
+for their support. In particular, I would like to thank Dr.~G.~Andy
+Chang for showing me what it means to be a statistician.
+
+Finally, and most importantly, I would like to thank my wife for her
+patience and understanding while I worked hours, days, months, and
+years on a \emph{free book}. In retrospect, I can't believe I ever
+got away with it.
+
\vfill{}
@@ -771,43 +790,8 @@
\paragraph*{What do I want them to know?}
-\begin{itemize}
-\item don't forget to mention rounding issues
-\item basic information about how to install, start up, and interact with\textsf{
-R}
-\item how to use \textsf{R} like a calculator (essentially arithmetic with
-\textsf{R})
-\item what variables are and how to name them
-\item about vectors
-\begin{itemize}
-\item the different types (numeric, character, logical, missing)
-\item how to access different parts of a vector
-\end{itemize}
-\item how to type in data, with c() and scan() enter data,
-\item how to import data frames from packages, and how to import data from
-elsewhere?
-\item need to know about vectors and (data frames) the different types of
-vectors (numeric, character, logical)
-\item how to get help
-\begin{itemize}
-\item mailing lists
-\item manuals
-\item see the source code
-\item ? and ??
-\end{itemize}
-\item the concept of add on packages, how to download, and how to \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!library()!\inputencoding{utf8}
-them
-\item some frequently asked questions
-
-\begin{itemize}
-\item they need to know about finite precision arithmetic
-\end{itemize}
-\item basic tricks of the trade like command history and clearing the console,
-case sensitivity
-\end{itemize}
-
\section{Downloading and Installing \textsf{R\label{sec:Downloading-and-Installing-R}}}
The instructions for obtaining \textsf{R} largely depend on the user's
@@ -855,7 +839,7 @@
download and install these packages and even inspect the source code.
To install a package named \inputencoding{latin9}\lstinline[showstringspaces=false]!foo!\inputencoding{utf8},
-open up \textsf{R} and type \inputencoding{latin9}\lstinline[showstringspaces=false]!install.packages("foo")!\inputencoding{utf8}.
+open up \textsf{R} and type \inputencoding{latin9}\lstinline[showstringspaces=false]!install.packages("foo")!\inputencoding{utf8}\index{install.packages@\texttt{install.packages}}.
To install \inputencoding{latin9}\lstinline[showstringspaces=false]!foo!\inputencoding{utf8}
and additionally install all of the other packages on which \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!foo!\inputencoding{utf8}
depends, instead type \inputencoding{latin9}\lstinline[showstringspaces=false]!install.packages("foo", depends = TRUE)!\inputencoding{utf8}.
@@ -865,12 +849,12 @@
of available packages; simply choose one or more to install.
No matter how many packages are installed onto the system, each one
-must first be loaded for use with the \inputencoding{latin9}\lstinline[showstringspaces=false]!library!\inputencoding{utf8}
+must first be loaded for use with the \inputencoding{latin9}\lstinline[showstringspaces=false]!library!\inputencoding{utf8}\index{library@\texttt{library}}
function. For instance, the \inputencoding{latin9}\lstinline[showstringspaces=false]!foreign!\inputencoding{utf8}
-package (in the base distribution) contains all sorts of functions
-needed to import data sets into \textsf{R} from other software such
-as SPSS, SAS, \emph{etc}.. But none of those functions will be available
-until the command \inputencoding{latin9}\lstinline[showstringspaces=false]!library(foreign)!\inputencoding{utf8}
+package \cite{foreign} contains all sorts of functions needed to
+import data sets into \textsf{R} from other software such as SPSS,
+SAS, \emph{etc}.. But none of those functions will be available until
+the command \inputencoding{latin9}\lstinline[showstringspaces=false]!library(foreign)!\inputencoding{utf8}
is issued.
Type \inputencoding{latin9}\lstinline[showstringspaces=false]!library()!\inputencoding{utf8}
@@ -912,40 +896,43 @@
customize the appearance of the interface to choose what colors to
display, when to display them, and how to display them.
\begin{description}
-\item [{\textsf{R~}Editor~(Windows):}] In Microsoft$\circledR$ Windows,
-\textsf{R}Gui has its own built-in script editor, called \textsf{R}
-Editor. From the console window, select \textsf{File}\emph{ }\textsf{$\triangleright$}\emph{
-}\textsf{New}\textsf{\emph{ }}\textsf{Script}\emph{.} A script window
-opens, and the lines of code can be written in the window. When satisfied
-with the code, the user highlights all of the commands and presses
-\textsf{Ctrl+R}. The commands are automatically run at once in \textsf{R}
-and the output is shown. To save the script for later, click \textsf{File}\emph{
+\item [{\textsf{R~}Editor~(Windows):\index{R Editor@\textsf{R} Editor}}] In
+Microsoft$\circledR$ Windows, \textsf{R}Gui has its own built-in
+script editor, called \textsf{R} Editor. From the console window,
+select \textsf{File}\emph{ }\textsf{$\triangleright$}\emph{ }\textsf{New}\textsf{\emph{
+}}\textsf{Script}\emph{.} A script window opens, and the lines of
+code can be written in the window. When satisfied with the code, the
+user highlights all of the commands and presses \textsf{Ctrl+R}. The
+commands are automatically run at once in \textsf{R} and the output
+is shown. To save the script for later, click \textsf{File}\emph{
}\textsf{$\triangleright$}\emph{ }\textsf{Save as...} in \textsf{R}
Editor. The script can be reopened later with \textsf{File}\emph{
}\textsf{$\triangleright$}\emph{ }\textsf{Open Script...} in \textsf{RGui}.
Note that \textsf{R} Editor does not have the fancy syntax highlighting
that the others do.
-\item [{\textsf{R}WinEdt:}] This option is coordinated with WinEdt for
-\LaTeX{} and has additional features such as code highlighting, remote
-sourcing, and a ton of other things. However, one first needs to download
-and install a shareware version of another program, WinEdt, which
-is only free for a while -- pop-up windows will eventually appear
-that ask for a registration code. \textsf{R}WinEdt is nevetheless
-a very fine choice if you already own WinEdt or are planning to purchase
-it in the near future.
-\item [{Tinn-\textsf{R}/Sciviews-K:}] This one is completely free and has
-all of the above mentioned options and more. It is simple enough to
-use that the user can virtually begin working with it immediately
-after installation. But Tinn-\textsf{R} proper is only available for
-Microsoft$\circledR$ Windows operating systems. If you are on MacOS
-or Linux, a comparable alternative is Sci-Views - Komodo Edit.
-\item [{Emacs/ESS:}] Emacs is an all purpose text editor. It can do absolutely
-anything with respect to modifying, searching, editing, and manipulating,
-text. And if Emacs can't do it, then you can write a program that
-extends Emacs to do it. Once such extension is called \emph{ESS},
-which stands for \emph{E}macs \emph{S}peaks \emph{S}tatistics. With
-ESS a person can speak to \textsf{R,} do all of the tricks that the
-other script editors offer, and much, much, more.
+\item [{\textsf{R}WinEdt:\index{RWinEdt@\textsf{R}WinEdt}}] This option
+is coordinated with WinEdt for \LaTeX{} and has additional features
+such as code highlighting, remote sourcing, and a ton of other things.
+However, one first needs to download and install a shareware version
+of another program, WinEdt, which is only free for a while -- pop-up
+windows will eventually appear that ask for a registration code. \textsf{R}WinEdt
+is nevetheless a very fine choice if you already own WinEdt or are
+planning to purchase it in the near future.
+\item [{Tinn-\textsf{R}/Sciviews-K:\index{Tinn-R at Tinn-\textsf{R}}\index{Sciviews-K}}] This
+one is completely free and has all of the above mentioned options
+and more. It is simple enough to use that the user can virtually begin
+working with it immediately after installation. But Tinn-\textsf{R}
+proper is only available for Microsoft$\circledR$ Windows operating
+systems. If you are on MacOS or Linux, a comparable alternative is
+Sci-Views - Komodo Edit.
+\item [{Emacs/ESS:\index{Emacs}\index{ESS}}] Emacs is an all purpose
+text editor. It can do absolutely anything with respect to modifying,
+searching, editing, and manipulating, text. And if Emacs can't do
+it, then you can write a program that extends Emacs to do it. Once
+such extension is called \emph{ESS}, which stands for \emph{E}macs
+\emph{S}peaks \emph{S}tatistics. With ESS a person can speak to \textsf{R,}
+do all of the tricks that the other script editors offer, and much,
+much, more.
\emph{Fair warning}: if you want to try Emacs and if you grew up with
@@ -955,12 +942,12 @@
Emacs to behave the way you want.) I have personally experienced this
transformation and I will never go back.
-\item [{JGR~(read~{}``Jaguar''):}] This one has the bells and whistles
-of \textsf{RGui} plus it is based on Java, so it works on multiple
-operating systems. It has its own script editor like \textsf{R} Editor
-but with additional features such as syntax highlighting and code-completion.
-If you do not use Microsoft$\circledR$ Windows (or even if you do)
-you definitely want to check out this one.
+\item [{JGR~(read~{}``Jaguar''):\index{JGR}}] This one has the bells
+and whistles of \textsf{RGui} plus it is based on Java, so it works
+on multiple operating systems. It has its own script editor like \textsf{R}
+Editor but with additional features such as syntax highlighting and
+code-completion. If you do not use Microsoft$\circledR$ Windows (or
+even if you do) you definitely want to check out this one.
\item [{Kate,~Bluefish,~\emph{etc}.}] There are literally dozens of other
text editors available, many of them free, and each has its own (dis)advantages.
I only have mentioned the ones with which I have had substantial personal
@@ -978,7 +965,7 @@
On the left side of the screen (under \textbf{Projects}) there are
several choices available.
\begin{description}
-\item [{The~\textsf{R~}Commander~(\inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!Rcmdr!\inputencoding{utf8})}] provides
+\item [{The~\textsf{R~}Commander~(\inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!Rcmdr!\inputencoding{utf8})\index{The R Commander at The \textsf{R} Commander}}] provides
a point-and-click interface to many basic statistical tasks. It is
called the {}``Commander'' because every time one makes a selection
from the menus, the code corresponding to the task is listed in the
@@ -993,17 +980,19 @@
to make them easy to identify in the \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!CRAN!\inputencoding{utf8}
package list. One such plugin is \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!RcmdrPlugin.IPSUR!\inputencoding{utf8},
which accompanies this text.
-\item [{Poor~Man's~GUI~(\inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!pmg!\inputencoding{utf8})}] is
+\item [{Poor~Man's~GUI~(\inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!pmg!\inputencoding{utf8})\index{Poor Man's GUI}}] is
an alternative to the \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!Rcmdr!\inputencoding{utf8}
which is based on GTk instead of Tcl/Tk. It has been a while since
I used this it but I remember liking it very much when I did. One
thing that stood out was that the user could drag-and-drop datasets
for plots. See here for more information \url{http://wiener.math.csi.cuny.edu/pmg/}
-\item [{Rattle}] is a data mining toolkit which is designed to manage/analyze
-very large data sets, but it provides enough other general functionality
-to merit mention here. See \cite{rattle} for more information.
-\item [{Deducer}] is relatively new and shows promise from what I have
-seen, but I have not actually used it in the classroom yet.
+\item [{Rattle\index{Rattle}}] is a data mining toolkit which is designed
+to manage/analyze very large data sets, but it provides enough other
+general functionality to merit mention here. See \cite{rattle} for
+more information.
+\item [{Deducer\index{Deducer}}] is relatively new and shows promise from
+what I have seen, but I have not actually used it in the classroom
+yet.
\end{description}
\section{Basic \textsf{R} Operations and Concepts\label{sec:Basic-R-Operations}}
@@ -1029,11 +1018,11 @@
7^8 # 7 to the 8th power
@
-Notice the comment character \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!#!\inputencoding{utf8}.
+Notice the comment character \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!#!\inputencoding{utf8}\index{#@\texttt{\#}}.
Anything typed after a \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!#!\inputencoding{utf8}
symbol is ignored by \textsf{R}. We know that $20/6$ is a repeating
decimal, but the above example shows only 7 digits. We can change
-the number of digits displayed with \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!options!\inputencoding{utf8}:
+the number of digits displayed with \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!options!\inputencoding{utf8}\index{options@\texttt{options}}:
<<keep.source = TRUE>>=
options(digits = 16)
@@ -1044,10 +1033,10 @@
options(digits = 7) # back to default
@
-Note that it is possible to set \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!digits!\inputencoding{utf8}
+Note that it is possible to set \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!digits!\inputencoding{utf8}\index{digits@\texttt{digits}}
up to 22, but setting them over 16 is not recommended (the extra significant
-digits are not necessarily reliable). Above notice the \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!sqrt!\inputencoding{utf8}
-function for square roots and the \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!exp!\inputencoding{utf8}
+digits are not necessarily reliable). Above notice the \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!sqrt!\inputencoding{utf8}\index{sqrt@\texttt{sqrt}}
+function for square roots and the \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!exp!\inputencoding{utf8}\index{exp@\texttt{exp}}
function for powers of $\me$, Euler's constant.
@@ -1089,17 +1078,17 @@
are represented exactly by \textsf{R}.
\item [{double:}] real numbers (rational and irrational); these numbers
are not represented exactly (save integers or fractions with a denominator
-that is a multiple of 2, see An Introduction to \textsf{R}).
+that is a multiple of 2, see \cite{Venables2010}).
\item [{character:}] elements that are wrapped with pairs of \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!"!\inputencoding{utf8}
or \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!'!\inputencoding{utf8};
\item [{logical:}] includes \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!TRUE!\inputencoding{utf8},
\inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!FALSE!\inputencoding{utf8},
and \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!NA!\inputencoding{utf8}
-(which are reserved words); the \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!NA!\inputencoding{utf8}
+(which are reserved words); the \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!NA!\inputencoding{utf8}\index{NA@\texttt{NA}}
stands for {}``not available'', \emph{i.e.}, a missing value.
\end{description}
-You can determine an object's type with the \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!typeof!\inputencoding{utf8}
-function. In addition to the above, there is the \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!complex!\inputencoding{utf8}
+You can determine an object's type with the \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!typeof!\inputencoding{utf8}\index{typeof@\texttt{typeof}}
+function. In addition to the above, there is the \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!complex!\inputencoding{utf8}\index{complex@\texttt{complex}}\index{as.complex@\texttt{as.complex}}
data type:
<<five, keep.source = TRUE>>=
@@ -1111,8 +1100,8 @@
@
Note that you can just type \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!(1i)^2!\inputencoding{utf8}
-to get the same answer. The \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!NaN!\inputencoding{utf8}
-stands for {}``not a number''; it is represented internally as \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!double!\inputencoding{utf8}.
+to get the same answer. The \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!NaN!\inputencoding{utf8}\index{NaN@\texttt{NaN}}
+stands for {}``not a number''; it is represented internally as \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!double!\inputencoding{utf8}\index{double}.
\subsection{Vectors}
@@ -1123,7 +1112,7 @@
\paragraph*{Entering data vectors}
\begin{enumerate}
-\item \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!c!\inputencoding{utf8}:
+\item \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!c!\inputencoding{utf8}\index{c@\texttt{c}}:
If you would like to enter the data \texttt{74,31,95,61,76,34,23,54,96}
into \textsf{R}, you may create a data vector with the \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!c!\inputencoding{utf8}
function (which is short for \emph{concatenate}).
@@ -1138,7 +1127,7 @@
the most general type of any of the elements, so if you do \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!c(1, "2")!\inputencoding{utf8}
then the result will be \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!c("1", "2")!\inputencoding{utf8}.
-\item \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!scan!\inputencoding{utf8}:
+\item \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!scan!\inputencoding{utf8}\index{scan@\texttt{scan}}:
This method is useful when the data are stored somewhere else. For
instance, you may type \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!x <- scan()!\inputencoding{utf8}
at the command prompt and \textsf{R} will display \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!1:!\inputencoding{utf8}
@@ -1150,7 +1139,7 @@
all at the \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!1:!\inputencoding{utf8}
prompt, and \textsf{R} will store all of the values instantly in the
vector \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!x!\inputencoding{utf8}.
-\item repeated data; regular patterns: the \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!seq!\inputencoding{utf8}
+\item repeated data; regular patterns: the \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!seq!\inputencoding{utf8}\index{seq@\texttt{seq}}
function will generate all sorts of sequences of numbers. It has the
arguments \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!from!\inputencoding{utf8},
\inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!to!\inputencoding{utf8},
@@ -1172,8 +1161,8 @@
1:5
@
-The vector \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!LETTERS!\inputencoding{utf8}
-has the 26 letters of the English alphabet in uppercase and \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!letters!\inputencoding{utf8}
+The vector \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!LETTERS!\inputencoding{utf8}\index{LETTERS@\texttt{LETTERS}}
+has the 26 letters of the English alphabet in uppercase and \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!letters!\inputencoding{utf8}\index{letters@\texttt{letters}}
has all of them in lowercase.
\end{enumerate}
@@ -1181,7 +1170,7 @@
\paragraph*{Indexing data vectors}
Sometimes we do not want the whole vector, but just a piece of it.
-We can access the intermediate parts with the \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]![]!\inputencoding{utf8}
+We can access the intermediate parts with the \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]![]!\inputencoding{utf8}\index{[]@\texttt{{[}{]}}}
operator. Observe (with \inputencoding{latin9}\lstinline[basicstyle={\ttfamily}]!x!\inputencoding{utf8}
defined above)
@@ -1226,7 +1215,7 @@
\item Type the name of the function without any parentheses or arguments.
If you are lucky then the code for the entire function will be printed,
right there looking at you. For instance, suppose that we would like
-to see how the \inputencoding{latin9}\lstinline[showstringspaces=false]!intersect!\inputencoding{utf8}
+to see how the \inputencoding{latin9}\lstinline[showstringspaces=false]!intersect!\inputencoding{utf8}\index{intersect@\texttt{intersect}}
function works:
@@ -1234,10 +1223,10 @@
intersect
@
-\item If instead it shows \inputencoding{latin9}\lstinline[showstringspaces=false]!UseMethod("!\inputencoding{utf8}\emph{something}\inputencoding{latin9}\lstinline[showstringspaces=false]!")!\inputencoding{utf8}
+\item If instead it shows \inputencoding{latin9}\lstinline[showstringspaces=false]!UseMethod("!\inputencoding{utf8}\emph{something}\inputencoding{latin9}\lstinline[showstringspaces=false]!")!\inputencoding{utf8}\index{UseMethod@\texttt{UseMethod}}
then you will need to choose the \emph{class} of the object to be
inputted and next look at the \emph{method} that will be \emph{dispatched}
-to the object. For instance, typing \inputencoding{latin9}\lstinline[showstringspaces=false]!rev!\inputencoding{utf8}
+to the object. For instance, typing \inputencoding{latin9}\lstinline[showstringspaces=false]!rev!\inputencoding{utf8}\index{rev@\texttt{rev}}
says
@@ -1268,7 +1257,7 @@
\item Some functions are hidden by a \emph{namespace} (see An Introduction
to \textsf{R} \cite{Venables2010}), and are not visible on the first
-try. For example, if we try to look at the code for \inputencoding{latin9}\lstinline[showstringspaces=false]!wilcox.test!\inputencoding{utf8}
+try. For example, if we try to look at the code for \inputencoding{latin9}\lstinline[showstringspaces=false]!wilcox.test!\inputencoding{utf8}\index{wilcox.test@\texttt{wilcox.test}}
(see Chapter \ref{cha:Nonparametric-Statistics}) we get the following:
@@ -1285,8 +1274,8 @@
function name with three colons; the command \inputencoding{latin9}\lstinline[showstringspaces=false]!stats:::wilcox.test.default!\inputencoding{utf8}
will show the source code, omitted here for brevity.
-\item If it shows \inputencoding{latin9}\lstinline[showstringspaces=false]!.Internal(!\inputencoding{utf8}\emph{something}\inputencoding{latin9}\lstinline[showstringspaces=false]!)!\inputencoding{utf8}
-or \inputencoding{latin9}\lstinline[showstringspaces=false]!.Primitive("!\inputencoding{utf8}\emph{something}\inputencoding{latin9}\lstinline[showstringspaces=false]!")!\inputencoding{utf8},
+\item If it shows \inputencoding{latin9}\lstinline[showstringspaces=false]!.Internal(!\inputencoding{utf8}\emph{something}\inputencoding{latin9}\lstinline[showstringspaces=false]!)!\inputencoding{utf8}\index{.Internal@\texttt{.Internal}}
+or \inputencoding{latin9}\lstinline[showstringspaces=false]!.Primitive("!\inputencoding{utf8}\emph{something}\inputencoding{latin9}\lstinline[showstringspaces=false]!")!\inputencoding{utf8}\index{.Primitive@\texttt{.Primitive}},
then it will be necessary to download the source code of \textsf{R}
(which is \emph{not} a binary version with an \inputencoding{latin9}\lstinline[showstringspaces=false]!.exe!\inputencoding{utf8}
extension) and search inside the code there. See Ligges \cite{Ligges2006}
@@ -1326,36 +1315,36 @@
about, for example, \inputencoding{latin9}\lstinline[showstringspaces=false]!mean!\inputencoding{utf8}
or \inputencoding{latin9}\lstinline[showstringspaces=false]!plot!\inputencoding{utf8}.
Typing \inputencoding{latin9}\lstinline[showstringspaces=false]!mean!\inputencoding{utf8}
-in the window is equivalent to typing \inputencoding{latin9}\lstinline[showstringspaces=false]!help("mean")!\inputencoding{utf8}
-at the command line, or more simply, \inputencoding{latin9}\lstinline[showstringspaces=false]!?mean!\inputencoding{utf8}.
+in the window is equivalent to typing \inputencoding{latin9}\lstinline[showstringspaces=false]!help("mean")!\inputencoding{utf8}\index{help@\texttt{help}}
+at the command line, or more simply, \inputencoding{latin9}\lstinline[showstringspaces=false]!?mean!\inputencoding{utf8}\index{?@\texttt{?}}.
Note that this method only works if the function of interest is contained
in a package that is already loaded into the search path with \inputencoding{latin9}\lstinline[showstringspaces=false]!library!\inputencoding{utf8}.
\item \textbf{HTML Help}: use this to browse the manuals with point-and-click
links. It also has a Search Engine \& Keywords for searching the help
page titles, with point-and-click links for the search results. This
is possibly the best help method for beginners. It can be started
-from the command line with the command \inputencoding{latin9}\lstinline[showstringspaces=false]!help.start()!\inputencoding{utf8}.
+from the command line with the command \inputencoding{latin9}\lstinline[showstringspaces=false]!help.start()!\inputencoding{utf8}\index{help.start@\texttt{help.start}}.
\item \textbf{Search help\ldots{}}: use this if you do not know the exact
name of the function of interest, or if the function is in a package
that has not been loaded yet. For example, you may enter \inputencoding{latin9}\lstinline[showstringspaces=false]!plo!\inputencoding{utf8}
and a text window will return listing all the help files with an alias,
concept, or title matching `\inputencoding{latin9}\lstinline[showstringspaces=false]!plo!\inputencoding{utf8}'
-using regular expression matching; it is equivalent to typing \inputencoding{latin9}\lstinline[showstringspaces=false]!help.search("plo")!\inputencoding{utf8}
+using regular expression matching; it is equivalent to typing \inputencoding{latin9}\lstinline[showstringspaces=false]!help.search("plo")!\inputencoding{utf8}\index{help.search@\texttt{help.search}}
at the command line. The advantage is that you do not need to know
the exact name of the function; the disadvantage is that you cannot
point-and-click the results. Therefore, one may wish to use the HTML
-Help search engine instead. An equivalent way is \inputencoding{latin9}\lstinline[showstringspaces=false]!??plo!\inputencoding{utf8}
+Help search engine instead. An equivalent way is \inputencoding{latin9}\lstinline[showstringspaces=false]!??plo!\inputencoding{utf8}\index{??@\texttt{??}}
at the command line.
\item \textbf{search.r-project.org\ldots{}}: this will search for words
in help lists and email archives of the \textsf{R} Project. It can
be very useful for finding other questions that other users have asked.
\item \textbf{Apropos\ldots{}}: use this for more sophisticated partial
-name matching of functions. See \inputencoding{latin9}\lstinline[showstringspaces=false]!?apropos!\inputencoding{utf8}
+name matching of functions. See \inputencoding{latin9}\lstinline[showstringspaces=false]!?apropos!\inputencoding{utf8}\index{apropos@\texttt{apropos}}
for details.
\end{itemize}
On the help pages for a function there are sometimes {}``Examples''
listed at the bottom of the page, which will work if copy-pasted at
-the command line ( unless marked otherwise). The \inputencoding{latin9}\lstinline[showstringspaces=false]!example!\inputencoding{utf8}
+the command line (unless marked otherwise). The \inputencoding{latin9}\lstinline[showstringspaces=false]!example!\inputencoding{utf8}\index{example@\texttt{example}}
function will run the code automatically, skipping the intermediate
step. For instance, we may try \inputencoding{latin9}\lstinline[showstringspaces=false]!example(mean)!\inputencoding{utf8}
to see a few examples of how the \inputencoding{latin9}\lstinline[showstringspaces=false]!mean!\inputencoding{utf8}
@@ -1386,9 +1375,9 @@
\item Search the archives. Even if your question is not a FAQ, there is
a very high likelihood that your question has been asked before on
the mailing list. If you want to know about topic \inputencoding{latin9}\lstinline[showstringspaces=false]!foo!\inputencoding{utf8},
-then you can do \inputencoding{latin9}\lstinline[showstringspaces=false]!RSiteSearch("foo")!\inputencoding{utf8}
+then you can do \inputencoding{latin9}\lstinline[showstringspaces=false]!RSiteSearch("foo")!\inputencoding{utf8}\index{RSiteSearch@\texttt{RSiteSearch}}
to search the mailing list archives (and the online help) for it.
-\item Do a Google search and an RSeek.org search.
+\item Do a Google search and an \texttt{RSeek.org} search.
\end{enumerate}
If your question is not a FAQ, has not been asked on \textsf{R}-help
before, and does not yield to a Google (or alternative) search, then,
@@ -1402,7 +1391,7 @@
mail and copy-paste into an \textsf{R} session. If you make the readers'
job easier then it will increase the likelihood of a response.
\item Questions are often related to a specific data set, and the best way
-to communicate the data is with a \inputencoding{latin9}\lstinline[showstringspaces=false]!dump!\inputencoding{utf8}
+to communicate the data is with a \inputencoding{latin9}\lstinline[showstringspaces=false]!dump!\inputencoding{utf8}\index{dump@\texttt{dump}}
command. For instance, if your question involves data stored in a
vector \inputencoding{latin9}\lstinline[showstringspaces=false]!x!\inputencoding{utf8},
you can type \inputencoding{latin9}\lstinline[showstringspaces=false]!dump("x","")!\inputencoding{utf8}
@@ -1412,7 +1401,7 @@
will be available to him/her.
\item Sometimes the answer the question is related to the operating system
used, the attached packages, or the exact version of \textsf{R} being
-used. The \inputencoding{latin9}\lstinline[showstringspaces=false]!sessionInfo()!\inputencoding{utf8}
+used. The \inputencoding{latin9}\lstinline[showstringspaces=false]!sessionInfo()!\inputencoding{utf8}\index{sessionInfo@\texttt{sessionInfo}}
command collects all of this information to be copy-pasted into an
email (and the Posting Guide requests this information). See Appendix
\ref{cha:R-Session-Information} for an example.
@@ -1423,21 +1412,22 @@
There is a mountain of information on the Internet about \textsf{R}.
Below are a few of the important ones.
\begin{description}
-\item [{The~\textsf{R~}Project~for~Statistical~Computing:}] (\url{http://www.r-project.org/})
+\item [{The~\textsf{R~}Project~for~Statistical~Computing:\index{The R-Project at The \textsf{R}-Project}}] (\url{http://www.r-project.org/})
Go here first.
-\item [{The~Comprehensive~\textsf{R~}Archive~Network:}] (\url{http://cran.r-project.org/})
+\item [{The~Comprehensive~\textsf{R~}Archive~Network:\index{CRAN}}] (\url{http://cran.r-project.org/})
This is where \textsf{R} is stored along with thousands of contributed
packages. There are also loads of contributed information (books,
tutorials, \emph{etc}.). There are mirrors all over the world with
duplicate information.
-\item [{\textsf{R}-Forge:}] (\url{http://r-forge.r-project.org/}) This
-is another location where \textsf{R} packages are stored. Here you
-can find development code which has not yet been released to \textsf{CRAN}.
-\item [{\textsf{R~}Wiki:}] (\url{http://wiki.r-project.org/rwiki/doku.php})
+\item [{\textsf{R}-Forge:\index{R-Forge@\textsf{R}-Forge}}] (\url{http://r-forge.r-project.org/})
+This is another location where \textsf{R} packages are stored. Here
+you can find development code which has not yet been released to \textsf{CRAN}.
+\item [{\textsf{R~}Wiki:\index{R-Wiki@\textsf{R}-Wiki}}] (\url{http://wiki.r-project.org/rwiki/doku.php})
There are many tips and tricks listed here. If you find a trick of
your own, login and share it with the world.
-\item [{Other:}] the \textsf{R} Graph Gallery (\url{http://addictedtor.free.fr/graphiques/})
-and \textsf{R} Graphical Manual (\url{http://bm2.genes.nig.ac.jp/RGM2/index.php})
+\item [{Other:}] the \textsf{R} Graph Gallery\index{R Graph Gallery@\textsf{R} Graph Gallery}
+(\url{http://addictedtor.free.fr/graphiques/}) and \textsf{R} Graphical
+Manual\index{R Graphical Manual@\textsf{R} Graphical Manual} (\url{http://bm2.genes.nig.ac.jp/RGM2/index.php})
[TRUNCATED]
To get the complete diff run:
svnlook diff /svnroot/ipsur -r 124
More information about the IPSUR-commits
mailing list