[Genabel-commits] r1808 - tutorials/GenABEL_general

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Aug 26 09:56:21 CEST 2014


Author: lckarssen
Date: 2014-08-26 09:56:20 +0200 (Tue, 26 Aug 2014)
New Revision: 1808

Modified:
   tutorials/GenABEL_general/introR.Rnw
Log:
Small improvements to the introR chapter of the GenABEL tutorial.


Modified: tutorials/GenABEL_general/introR.Rnw
===================================================================
--- tutorials/GenABEL_general/introR.Rnw	2014-08-26 07:55:36 UTC (rev 1807)
+++ tutorials/GenABEL_general/introR.Rnw	2014-08-26 07:56:20 UTC (rev 1808)
@@ -32,11 +32,11 @@
 Let us first use R as a powerful calculator. 
 You can directly operate with numbers in R. Try multiplying two by three:
 <<>>=
-2*3
+2 * 3
 @
-Other standard arithmetic operations can be performed in similar manner:
+Other standard arithmetic operations can be performed in a similar manner:
 <<>>=
-2/3
+2 / 3
 @
 (division)
 <<>>=
@@ -44,11 +44,11 @@
 @
 (power)
 <<>>=
-2-3
+2 - 3
 @
 (subtraction)
 <<>>=
-2+3
+2 + 3
 @
 (summation)\footnote{For a complete list of arithmetic operations try \texttt{help("+")}.}.
 \index{arithmetic operations}
@@ -71,7 +71,7 @@
 \index{functions!mathematical}
 
 The arithmetic operations and functions can be nested and therefore 
-we can obtain the above result in one line, and without the 2nd-digit 
+we can obtain the above result in one line, and without the 2$^{\text{nd}}$-digit 
 approximation:
 <<>>=
 exp(log10(sqrt(2+3)))
@@ -84,7 +84,10 @@
 and estimating statistical power. 
 
 For any function with a name say '\texttt{fun}', help may be obtained 
-by typing '\texttt{help(fun)}' (or \texttt{?fun}) on the command line. 
+by typing '\texttt{help(fun)}' (or \texttt{?fun}) on the command 
+line\footnote{If you run R directly from the Linux, OS X or Windows 
+  command line (\ie not in RStudio or the Windows R environment), you 
+  can exit the help by typing \texttt{q}.}. 
 
 R help pages have a standard layout, documenting usage of the 
 function, explaining function arguments, providing details 
@@ -122,8 +125,8 @@
 
 If you do not 
 know the exact name for the function you look for, try 
-'\texttt{help.search("query")}', where \texttt{query} is the 
-keyword. 
+'\texttt{help.search("query")}', where \texttt{query} is a 
+keyword related to what you are looking for. 
 
 \begin{Exercise}[title=Finding functions and help pages]
 Try to find out what are the functions to do the
@@ -140,7 +143,7 @@
 be provided on the left-hand side of this operator and on the 
 right-hand side, there must be either the name of an already existing 
 variable or an expression. For example, we if want to assign the
-value '2' to the variable '\texttt{a}', and value '3' to the variable 
+value '2' to the variable '\texttt{a}', and the value '3' to the variable 
 '\texttt{b}' we would use the assignment operator in the following way:
 \index{assignment}
 \index{operation!assignment}
@@ -148,12 +151,10 @@
 a <- 2
 b <- 3
 @
-
 Typing the variable name on the R command line will return its value, \eg
 <<>>=
 b
 @
-
 Evaluation of the expression
 <<>>=
 exp(log10(sqrt(a+b)))



More information about the Genabel-commits mailing list