Book Image

R Statistical Application Development by Example Beginner's Guide

By : Prabhanjan Narayanachar Tattar
Book Image

R Statistical Application Development by Example Beginner's Guide

By: Prabhanjan Narayanachar Tattar

Overview of this book

<p>"R Statistical Application Development by Example Beginner’s Guide" explores statistical concepts and the R software, which are well integrated from the word go. This demarcates the separate learning of theory and applications and hence the title begins with “R Statistical …”. Almost every concept has an R code going with it which exemplifies the strength of R and applications. Thus, the reader first understands the data characteristics, descriptive statistics, and the exploratory attitude which gives the first firm footing of data analysis. Statistical inference and the use of simulation which makes use of the computational power complete the technical footing of statistical methods. Regression modeling, linear, logistic, and CART, builds the essential toolkit which helps the reader complete complex problems in the real world.<br /><br />The reader will begin with a brief understanding of the nature of data and end with modern and advanced statistical models like CART. Every step is taken with DATA and R code.<br /><br />The data analysis journey begins with exploratory analysis, which is more than simple descriptive data summaries, and then takes the traditional path up to linear regression modeling, and ends with logistic regression, CART, and spatial statistics.<br /><br />True to the title R Statistical Application Development by Example Beginner’s Guide, the reader will enjoy the examples and R software.</p>
Table of Contents (18 chapters)
R Statistical Application Development by Example Beginner's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
References
Index

Time for action – qplot


Here, we will first use the qplot function for obtaining various kinds of plots. To keep the story short, we are using the earlier datasets only and hence, a reproduction of the similar plots using qplot won't be displayed. The reader is encouraged to check ?qplot and its examples.

  1. Load the library with library(ggplot2).

  2. Rearrange the resistivity dataset in a different format and obtain the boxplots:

    test <- data.frame(rep(c("R1","R2"),each=8),c(resistivity[,1], resistivity[,2]))
    names(test) <- c("RES","VALUE")
    qplot(factor(RES),VALUE,data=test,geom="boxplot")

    The gplot function needs to be explicitly specified that RES is a factor variable and according to its levels, we need to obtain the boxplot for the resistivity values.

  3. For the Gasoline dataset, we would like to obtain a boxplot of the mileage accordingly as the gear system could be manual or automatic. Thus, the qplot can be put to action with qplot(factor(x11),y,data=Gasoline,geom= "boxplot").

  4. A histogram...