![](https://csdnimg.cn/release/download_crawler_static/10393664/bg14.jpg)
ABOUT THIS BOOK
xxiii
data from the keyboard. The second half discusses methods for importing data into R
from text files, web pages, spreadsheets, statistical packages, and databases.
Many users initially approach R because they want to create graphs, so we jump
right into that topic in chapter 3. No waiting required. We review methods of creating
graphs, modifying them, and saving them in a variety of formats.
Chapter 4 covers basic data management, including sorting, merging, and subset-
ting datasets, and transforming, recoding, and deleting variables.
Building on the material in chapter 4, chapter 5 covers the use of functions (math-
ematical, statistical, character) and control structures (looping, conditional execu-
tion) for data management. I then discuss how to write your own R functions and how
to aggregate data in various ways.
Chapter 6 demonstrates methods for creating common univariate graphs, such as
bar plots, pie charts, histograms, density plots, box plots, and dot plots. Each is useful
for understanding the distribution of a single variable.
Chapter 7 starts by showing how to summarize data, including the use of descrip-
tive statistics and cross-tabulations. We then look at basic methods for understanding
relationships between two variables, including correlations, t-tests, chi-square tests,
and nonparametric methods.
Chapter 8 introduces regression methods for modeling the relationship between a
numeric outcome variable and a set of one or more numeric predictor variables.
Methods for fitting these models, evaluating their appropriateness, and interpreting
their meaning are discussed in detail.
Chapter 9 considers the analysis of basic experimental designs through the analysis
of variance and its variants. Here we’re usually interested in how treatment combina-
tions or conditions affect a numerical outcome. Methods for assessing the appropri-
ateness of the analyses and visualizing the results are also covered.
Chapter 10 provides a detailed treatment of power analysis. Starting with a discus-
sion of hypothesis testing, the chapter focuses on how to determine the sample size
necessary to detect a treatment effect of a given size with a given degree of confi-
dence. This can help you to plan experimental and quasi-experimental studies that
are likely to yield useful results.
Chapter 11 expands on the material in chapter 6, covering the creation of graphs
that help you to visualize relationships among two or more variables. These include
various types of 2D and 3D scatter plots, scatter-plot matrices, line plots, correlograms,
and mosaic plots.
Chapter 12 presents analytic methods that work well in cases where data are sam-
pled from unknown or mixed distributions, where sample sizes are small, where outli-
ers are a problem, or where devising an appropriate test based on a theoretical
distribution is too complex and mathematically intractable. They include both resam-
pling and bootstrapping approaches—computer-intensive methods that are easily
implemented in R.
Chapter 13 expands on the regression methods in chapter 8 to cover data that are
not normally distributed. The chapter starts with a discussion of generalized linear