This eBook includes the following formats, accessible from your Account page after purchase:
EPUB The open industry format known for its reflowable content and usability on supported mobile devices.
MOBI The eBook format compatible with the Amazon Kindle and Amazon Kindle applications.
PDF The popular standard, used most often with the free Adobe® Reader® software.
This eBook requires no passwords or activation to read. We customize your eBook by discreetly watermarking it with your name, making it uniquely yours.
In just 24 lessons of one hour or less, Sams Teach Yourself R in 24 Hours helps you learn all the R skills you need to solve a wide spectrum of real-world data analysis problems. You’ll master the entire data analysis workflow, learning to build code that’s efficient, reproducible, and suitable for sharing with others.
This book’s straightforward, step-by-step approach teaches you how to import, manipulate, summarize, model, and plot data with R; formalize your analytical code; and build powerful R packages using current best practices.
Practical, hands-on examples show you how to apply what you learn.
Quizzes and exercises help you test your knowledge and stretch your skills.
Learn How To
Register your book at informit.com/register for convenient access to updates and corrections as they become available.
This book’s source code can be found at http://www.mango-solutions.com/wp/teach-yourself-r-in-24-hours-book/.
You can find all of the code in this book in an R package called Mango training available from CRAN..
Download the sample pages (includes Chapter 4 and Index)
HOUR 1: The R Community 1
A Concise History of R 1
The R Community 3
R Development 7
HOUR 2: The R Environment 11
Integrated Development Environments 11
R Syntax 14
R Objects 16
Using R Packages 23
Internal Help 28
HOUR 3: Single-Mode Data Structures 33
The R Data Types 33
Vectors, Matrices, and Arrays 34
Relationship Between Single-Mode Data Objects 60
HOUR 4: Multi-Mode Data Structures 67
Multi-Mode Structures 67
Data Frames 86
Exploring Your Data 93
HOUR 5: Dates, Times, and Factors 103
Working with Dates and Times 103
The lubridate Package 107
Working with Categorical Data 108
HOUR 6: Common R Utility Functions 115
Using R Functions 115
Functions for Numeric Data 117
Logical Data 121
Missing Data 122
Character Data 123
HOUR 7: Writing Functions: Part I 129
The Motivation for Functions 129
Creating a Simple Function 130
The If/Else Structure 136
HOUR 8: Writing Functions: Part II 151
Errors and Warnings 151
Checking Inputs 155
The Ellipsis 157
Checking Multivalue Inputs 162
Using Input Definition 164
HOUR 9: Loops and Summaries 173
Repetitive Tasks 173
The “apply” Family of Functions 181
The apply Function 183
The lapply Function 195
The sapply Function 204
The tapply Function 208