Biology Reference
In-Depth Information
6
5
4
3
2
Sagrei
Distichus
Fig. 1.4 Boxplots for the simulated branch diameters for sagrei and distichus lizards
> var(new.data[!is.sagrei, "Sim.Diameter"])
[1] 1.333333
The same comparison can be performed graphically by plotting the boxplots cor-
responding to the diameters of the branches for each specie next to each other; the
resulting plot is displayed in Fig. 1.4 .
> boxplot(Sim.Diameter ˜ Species, data = new.data,
+ ylab = "Diameter (inches)")
> abline(h = 4, lty = "dashed")
The call to abline adds a reference line separating narrow branches from wide
ones, which helps relating the behavior of the new data to the original ones. The
lty parameter specifies the line type, which in this case is dashed.
1.2.3 Further Reading
Providing a complete introduction to the R language in these few pages is clearly
impossible, and it is outside the scope of this topic. R and CRAN provide a com-
prehensive documentation in the form of several manuals available from CRAN and
help pages distributed with the base and contributed packages describing the char-
acteristics of each function and data set. Help pages can be accessed from within R
using the help , help.search functions and the ? operator (e.g., ?runif ).
We refer the reader to the excellent “Modern Applied Statistics with S” by
Venables and Ripley ( 2002 ) and to “Data Manipulation with R” by Spector ( 2009 )
for an in-depth coverage of R 's capabilities. Readers interested in understanding the
 
Search WWH ::




Custom Search