## Book description

Learn how to perform data analysis with the R language and software environment, even if you have little or no programming experience. With the tutorials in this hands-on guide, youâ??ll learn how to use the essential R tools you need to know to analyze data, including data types and programming concepts.

The second half of Learning R shows you real data analysis in action by covering everything from importing data to publishing your results. Each chapter in the book includes a quiz on what youâ??ve learned, and concludes with exercises, most of which involve writing R code.

• Write a simple R program, and discover what the language can do
• Use data types such as vectors, arrays, lists, data frames, and strings
• Execute code conditionally or repeatedly with branches and loops
• Apply R add-on packages, and package your own work for others
• Learn how to clean data you import from a variety of sources
• Understand data through visualization and summary statistics
• Use statistical models to pass quantitative judgments about data and make predictions
• Learn what to do when things go wrong while writing data analysis code

## Publisher resources

View/Submit Errata

1. Learning R
2. Preface
3. I. The R Language
1. 1. Introduction
1. Chapter Goals
2. What Is R?
3. Installing R
4. Choosing an IDE
6. How to Get Help in R
7. Installing Extra Related Software
8. Summary
2. 2. A Scientific Calculator
3. 3. Inspecting Variables and Your Workspace
4. 4. Vectors, Matrices, and Arrays
1. Chapter Goals
2. Vectors
3. Matrices and Arrays
4. Summary
5. 5. Lists and Data Frames
1. Chapter Goals
2. Lists
3. NULL
4. Pairlists
5. Data Frames
6. Summary
6. 6. Environments and Functions
1. Chapter Goals
2. Environments
3. Functions
4. Summary
7. 7. Strings and Factors
1. Chapter Goals
2. Strings
3. Factors
4. Summary
8. 8. Flow Control and Loops
1. Chapter Goals
2. Flow Control
3. Loops
4. Summary
10. 10. Packages
1. Chapter Goals
3. Installing Packages
4. Maintaining Packages
5. Summary
11. 11. Dates and Times
1. Chapter Goals
2. Date and Time Classes
3. Conversion to and from Strings
4. Time Zones
5. Arithmetic with Dates and Times
6. Lubridate
7. Summary
4. II. The Data Analysis Workflow
1. 12. Getting Data
1. Chapter Goals
2. Built-in Datasets
5. Web Data
6. Accessing Databases
7. Summary
2. 13. Cleaning and Transforming
1. Chapter Goals
2. Cleaning Strings
3. Manipulating Data Frames
4. Sorting
5. Functional Programming
6. Summary
3. 14. Exploring and Visualizing
1. Chapter Goals
2. Summary Statistics
3. The Three Plotting Systems
4. Scatterplots
5. Line Plots
6. Histograms
7. Box Plots
8. Bar Charts
9. Other Plotting Packages and Systems
10. Summary
4. 15. Distributions and Modeling
1. Chapter Goals
2. Random Numbers
3. Distributions
4. Formulae
5. A First Model: Linear Regressions
6. Other Model Types
7. Summary
5. 16. Programming
1. Chapter Goals
2. Messages, Warnings, and Errors
3. Error Handling
4. Debugging
5. Testing
6. Magic
7. Object-Oriented Programming
8. Summary
6. 17. Making Packages
5. III. Appendixes
6. E. Bibliography
7. Index