# 27 Best Books for Learning or Advancing your R Programming Knowledge

**From the Author: Why Use R for Your Statistical Work?**

*yauh peng, yauh leng*, which means “both inexpensive and beautiful.” Why use anything else?

**What You Will Learn**

- It is a public-domain implementation of the widely regarded S statistical language, and the R/S platform is a de facto standard among professional statisticians.
- It is comparable, and often superior, in power to commercial products in most of the significant senses -- variety of operations available, programmability, graphics, and so on.
- It is available for the Windows, Mac, and Linux operating systems.
- In addition to providing statistical operations, R is a general-purpose programming language, so you can use it to automate analyses and create new functions that extend the existing language features.
- R includes a library of several thousand user-contributed packages.
- It incorporates features found in object-oriented and functional programming languages.
- R is capable of producing beautiful graphics for your presentations, reports or articles.

Each recipe addresses a specific problem, with a discussion that explains the solution and offers insight into how it works. If you’re a beginner, *R Cookbook* will help get you started. If you’re an experienced data programmer, it will jog your memory and expand your horizons. You’ll get the job done faster and learn more about R in the process.

**What You Will Learn**

- Create vectors, handle variables, and perform other basic functions
- Input and output data
- Tackle data structures such as matrices, lists, factors, and data frames
- Work with probability, probability distributions, and random variables
- Calculate statistics and confidence intervals, and perform statistical tests
- Create a variety of graphic displays
- Build statistical models with linear regressions and analysis of variance (ANOVA)
- Explore advanced statistical techniques, such as finding clusters in your data.

**About the Book**

*R in Action, Second Edition* teaches you how to use the R language by presenting examples relevant to scientific, technical, and business developers. Focusing on practical solutions, the book offers a crash course in statistics, including elegant methods for dealing with messy and incomplete data. You'll also master R's extensive graphical capabilities for exploring and presenting data visually. And this expanded second edition includes new chapters on forecasting, data mining, and dynamic report writing.

**What's You Will Learn**

- Complete R language tutorial
- Using R to manage, analyze, and visualize data
- Techniques for debugging programs and creating packages
- OOP in R
- Over 160 graphs
- PART 5 EXPANDING YOUR SKILLS
- Advanced graphics with ggplot2
- Advanced programming
- Creating a package
- Creating dynamic reports
- Advanced graphics with the lattice package available online only from manning.com/kabacoff2

*The Book of R* is a comprehensive, beginner-friendly guide to R, the world’s most popular programming language for statistical analysis. Even if you have no programming experience and little more than a grounding in the basics of mathematics, you’ll find everything you need to begin using R effectively for statistical analysis.

**What You Will Learn**

- The fundamentals of programming in R, including how to write data frames, create functions, and use variables, statements, and loops
- Statistical concepts like exploratory data analysis, probabilities, hypothesis tests, and regression modeling, and how to execute them in R
- How to access R’s thousands of functions, libraries, and data sets
- How to draw valid and useful conclusions from your data
- How to create publication-quality graphics of your results.

Lander’s self-contained chapters start with the absolute basics, offering extensive hands-on practice and sample code. You’ll download and install R; navigate and use the R environment; master basic program control, data import, and manipulation; and walk through several essential tests. Then, building on this foundation, you’ll construct several complete models, both linear and nonlinear, and use some data mining techniques.

** What You Will Learn**

- Exploring R, RStudio, and R packages
- Using R for math: variable types, vectors, calling functions, and more
- Exploiting data structures, including data.frames, matrices, and lists
- Creating attractive, intuitive statistical graphics
- Writing user-defined functions
- Controlling program flow with if, ifelse, and complex checks
- Improving program efficiency with group manipulations
- Combining and reshaping multiple datasets
- Manipulating strings using R’s facilities and regular expressions
- Creating normal, binomial, and Poisson probability distributions
- Programming basic statistics: mean, standard deviation, and t-tests
- Building linear, generalized linear, and nonlinear models
- Assessing the quality of models and variable selection
- Preventing overfitting, using the Elastic Net and Bayesian methods
- \Analyzing univariate and multivariate time series data
- Grouping data via K-means and hierarchical clustering
- Preparing reports, slideshows, and web pages with knitr
- Building reusable R packages with devtools and Rcpp
- Getting involved with the R global community.

**In the last few years**, the R programming language has gained a lot of mindshare among people who need to manipulate and analyze data. One reason for this growth is that R has many tools for generating generate high-quality graphs. *R Graphics Cookbook* serves as a practical guide to help you make graphs quickly, without having to spend time learning about all the details of the R graphing systems.

**Author Winston** Chang bases the book in part on his own website, *R Cookbook*. He also includes coverage of the ggplot2 package, a more powerful and flexible way to make graphs in R. For situations where this is not the best option, Chang provides readers with simple versions of the non-ggplot2 alternatives.

Learn how to use R to turn raw data into insight, knowledge, and understanding. This book introduces you to R, RStudio, and the tidyverse, a collection of R packages designed to work together to make data science fast, fluent, and fun. Suitable for readers with no previous programming experience, R for Data Science is designed to get you doing data science as quickly as possible.

**What You Will Learn**

**Wrangle**—transform your datasets into a form convenient for analysis**Program**—learn powerful R tools for solving data problems with greater clarity and ease**Explore**—examine your data, generate hypotheses, and quickly test them**Model**—provide a low-dimensional summary that captures true "signals" in your dataset**Communicate**—learn R Markdown for integrating prose, code, and results

**Unlike many of the books** you will stumble upon on this topic, this book makes it easy for you to learn. The author brings you a unique guide that takes you through a natural sequence of lessons (step-by-step) whilst carefully explaining each concept and staying away from unnecessary technical jargon and defining the terms you must learn. This one-step-at-a-time approach allows anyone from an absolute beginner to a more knowledgeable programmer to easily grasp each lesson at their own pace and become more proficient as they progress through the book.

**What You Will Learn**

- The history of R programming and its benefits
- How to install R & R Studio and work with code editors
- The fundamentals of R syntax
- Function & Arguments
- R Programming with user packages
- Organizing data in Vectors
- Working with Data-Frames and Matrices
- Creating Lists
- Effective coding in R
- Controlling Logical Flow
- Working with base graphics
- Creating Faceted graphics using Lattice
- And much more!

People are becoming **more aware of R every day** as major institutions are adopting it as a standard. Part of its appeal is that it's a free tool that's taking the place of costly statistical software packages that sometimes take an inordinate amount of time to learn. Plus, R enables a user to carry out complex statistical analyses by simply entering a few commands, making sophisticated analyses available and understandable to a wide audience. *Statistical Analysis with R For Dummies* enables you to perform these analyses and to fully understand their implications and results.

**What You Will Learn**

- Gets you up to speed on the #1 analytics/data science software tool
- Demonstrates how to easily find, download, and use cutting-edge community-reviewed methods in statistics and predictive modeling
- Shows you how R offers intel from leading researchers in data science, free of charge
- Provides information on using R Studio to work with R.

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.

**What You Will Learn**

- 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

There are many excellent R resources for visualization, data science, and package development. Hundreds of scattered vignettes, web pages, and forums explain how to use R in particular domains. But little has been written on how to simply make R work effectively—until now. This hands-on book teaches novices and experienced R users how to write efficient R code.

**What You Will Learn**

- Get advice for setting up an R programming environment
- Explore general programming concepts and R coding techniques
- Understand the ingredients of an efficient R workflow
- Learn how to efficiently read and write data in R
- Dive into data carpentry—the vital skill for cleaning raw data
- Optimize your code with profiling, standard tricks, and other methods
- Determine your hardware capabilities for handling R computation
- Maximize the benefits of collaborative R programming
- Accelerate your transition from R hacker to R programmer

## 12. The R Book

The R language is recognized as one of the most powerful and flexible statistical software packages, enabling users to apply many statistical techniques that would be impossible without such software to help implement such large data sets. R has become an essential tool for understanding and carrying out research.

**What You Will Learn**

- Features full colour text and extensive graphics throughout.
- Introduces a clear structure with numbered section headings to help readers locate information more efficiently.
- Looks at the evolution of R over the past five years.
- Features a new chapter on Bayesian Analysis and Meta-Analysis.
- Presents a fully revised and updated bibliography and reference section.
- Is supported by an accompanying website allowing examples from the text to be run by the user.

**Learn how to program**by diving into the R language, and then use your newfound skills to solve practical data science problems. With this book, you’ll learn how to load data, assemble and disassemble data objects, navigate R’s environment system, write your own functions, and use all of R’s programming tools.

**Rstudio Master Instructor**Garrett Grolemund not only teaches you how to program, but also shows you how to get more from R than just visualizing and modeling data. You’ll gain valuable programming skills and support your work as a data scientist at the same time.

**What You Will Learn**

- Work hands-on with three practical data analysis projects based on casino games
- Store, retrieve, and change data values in your computer’s memory
- Write programs and simulations that outperform those written by typical R users
- Use R programming tools such as if else statements, for loops, and S3 classes
- Learn how to write lightning-fast vectorized R code
- Take advantage of R’s package system and debugging tools
- Practice and apply R programming concepts as you learn them

**This one-of-a-kind book** will help you use predictive analytics, Python, and R to solve real business problems and drive real competitive advantage. You’ll master predictive analytics through realistic case studies, intuitive data visualizations, and up-to-date code for both Python and R—not complex math.

You’ll learn why each problem matters, what data are relevant, and how to explore the data you’ve identified. You’ll walk through model construction, explanatory variable subset selection, and validation, mastering best practices for improving out-of-sample predictive performance.

** **

**What You Will Learn**

- Advertising and promotion
- Consumer preference and choice
- Market baskets and related purchases
- Economic forecasting
- Operations management
- Unstructured text and language
- Customer sentiment
- Brand and price
- Sports team performance
- And much more.

**Business analysts and developers** are increasingly collecting, curating, analyzing, and reporting on crucial business data. The R language and its associated tools provide a straightforward way to tackle day-to-day data science tasks without a lot of academic theory or advanced mathematics.

* Practical Data Science with R* shows you how to apply the R programming language and useful statistical techniques to everyday business situations. Using examples from marketing, business intelligence, and decision support, it shows you how to design experiments (such as A/B tests), build predictive models, and present results to audiences of all levels.

**What's You Will Learn **

- Data science for the business professional
- Statistical analysis using the R language
- Project lifecycle, from planning to delivery
- Numerous instantly familiar use cases
- Keys to effective data presentations
- Managing data
- Choosing and evaluating models
- Memorization methods
- Linear and logistic regression
- Unsupervised methods
- Exploring advanced methods
- Documentation and deployment
- Producing effective presentations

**Data science has** taken the world by storm. Every field of study and area of business has been affected as people increasingly realize the value of the incredible quantities of data being generated. But to extract value from those data, one needs to be trained in the proper data science skills.

**The R programming **language has become the de facto programming language for data science. Its flexibility, power, sophistication, and expressiveness have made it an invaluable tool for data scientists around the world. This book is about the fundamentals of R programming.

**You will get started** with the basics of the language, learn how to manipulate datasets, how to write functions, and how to debug and optimize code. With the fundamentals provided in this book, you will have a solid foundation on which to build your data science toolbox.

## 17. Learning Base R

**R is an open source** programming language and interactive programming environment that has become the software tool of choice in data analytics. Learning Base R provides an introduction to the language for those with and without prior programming experience.

** It introduces the key topics** that you will need to begin analyzing data and programming in R. The focus here is on the R language rather than a particular application. Nearly 200 exercises allow you to assess your understanding of R.

**Turn your R code** into packages that others can easily download and use. This practical book shows you how to bundle reusable R functions, sample data, and documentation together by applying author Hadley Wickham’s package development philosophy. In the process, you’ll work with devtools, roxygen, and testthat, a set of R packages that automate common development tasks. Devtools encapsulates best practices that Hadley has learned from years of working with this programming language.

**What You Will Learn **

- Learn about the most useful components of an R package, including vignettes and unit tests
- Automate anything you can, taking advantage of the years of development experience embodied in devtools
- Get tips on good style, such as organizing functions into files
- Streamline your development process with devtools
- Learn the best way to submit your package to the Comprehensive R Archive Network (CRAN)
- Learn from a well-respected member of the R community who created 30 R packages, including ggplot2, dplyr, and tidyr

**Advanced R** presents useful tools and techniques for attacking many types of R programming problems, helping you avoid mistakes and dead ends. With more than ten years of experience programming in R, the author illustrates the elegance, beauty, and flexibility at the heart of R.The book develops the necessary skills to produce quality code that can be used in a variety of circumstances.

**What You will learn**

- The fundamentals of R, including standard data types and functions
- Functional programming as a useful framework for solving wide classes of problems
- The positives and negatives of metaprogramming
- How to write fast, memory-efficient code

**About This Book**

- Explore the social media APIs in R to capture data and tame it
- Employ the machine learning capabilities of R to gain optimal business value
- A hands-on guide with real-world examples to help you take advantage of the vast opportunities that come with social media data

**What You Will Learn**

- Access APIs of popular social media sites and extract data
- Perform sentiment analysis and identify trending topics
- Measure CTR performance for social media campaigns
- Implement exploratory data analysis and correlation analysis
- Build a logistic regression model to detect spam messages
- Construct clusters of pictures using the K-means algorithm and identify popular personalities and destinations
- Develop recommendation systems using Collaborative Filtering and the Apriori algorithm.

**This book will be useful** to everyone who has struggled with displaying data in an informative and attractive way. Some basic knowledge of R is necessary (e.g., importing data into R). ggplot2 is a mini-language specifically tailored for producing graphics, and you'll learn everything you need in the book. After reading this book you'll be able to produce graphics customized precisely for your problems, and you'll find it easy to get graphics out of your head and on to the screen or page.

**What You Will Learn **

- Produce handsome, publication-quality plots with automatic legends created from the plot specification
- Superimpose multiple layers (points, lines, maps, tiles, box plots) from different data sources with automatically adjusted common scales
- Add customizable smoothers that use powerful modeling capabilities of R, such as loess, linear models, generalized additive models, and robust regression
- Save any ggplot2 plot (or part thereof) for later modification or reuse
- Create custom themes that capture in-house or journal style requirements and that can easily be applied to multiple plots
- Approach a graph from a visual perspective, thinking about how each component of the data is represented on the final plot

This new **color edition of Braun and Murdoch's** bestselling textbook integrates use of the RStudio platform and adds discussion of newer graphics systems, extensive exploration of Markov chain Monte Carlo, expert advice on common error messages, motivating applications of matrix decompositions, and numerous new examples and exercises.

**This is the only** introduction needed to start programming in R, the computing standard for analyzing data. Co-written by an R core team member and an established R author, this book comes with real R code that complies with the standards of the language.

**Unlike other introductory** books on the R system, this book emphasizes programming, including the principles that apply to most computing languages, and techniques used to develop more complex projects. Solutions, datasets, and any errata are available from the book's website. The many examples, all from real applications, make it particularly useful for anyone working in practical data analysis.

**Key Features**

- Harness the power of R for statistical computing and data science
- Explore, forecast, and classify data with R
- Use R to apply common machine learning algorithms to real-world scenarios

**What you will learn**

- Harness the power of R to build common machine learning algorithms with real-world data science applications
- Get to grips with R techniques to clean and prepare your data for analysis, and visualize your results
- Discover the different types of machine learning models and learn which is best to meet your data needs and solve your analysis problems
- Classify your data with Bayesian and nearest neighbour methods
- Predict values by using R to build decision trees, rules, and support vector machines
- Forecast numeric values with linear regression, and model your data with neural networks
- Evaluate and improve the performance of machine learning models
- Learn specialized machine learning techniques for text mining, social network data, big data, and more.

**About This Book**

- Grasp the major methods of predictive modeling and move beyond black box thinking to a deeper level of understanding
- Leverage the flexibility and modularity of R to experiment with a range of different techniques and data types
- Packed with practical advice and tips explaining important concepts and best practices to help you understand quickly and easily

**What You Will Learn**

- Master the steps involved in the predictive modeling process
- Learn how to classify predictive models and distinguish which models are suitable for a particular problem
- Understand how and why each predictive model works
- Recognize the assumptions, strengths, and weaknesses of a predictive model, and that there is no best model for every problem
- Select appropriate metrics to assess the performance of different types of predictive model
- Diagnose performance and accuracy problems when they arise and learn how to deal with them
- Grow your expertise in using R and its diverse range of packages.

**Learn how to program**by diving into the R language, and then use your newfound skills to solve practical data science problems. With this book, you’ll learn how to load data, assemble and disassemble data objects, navigate R’s environment system, write your own functions, and use all of R’s programming tools.

**What You Will Learn**

- Work hands-on with three practical data analysis projects based on casino games
- Store, retrieve, and change data values in your computer’s memory
- Write programs and simulations that outperform those written by typical R users
- Use R programming tools such as if else statements, for loops, and S3 classes
- Learn how to write lightning-fast vectorized R code
- Take advantage of R’s package system and debugging tools
- Practice and apply R programming concepts as you learn them

**Graphical models in their modern **form have been around since the late 1970s and appear today in many areas of the sciences. Along with the ongoing developments of graphical models, a number of different graphical modeling software programs have been written over the years.

**In recent years many of these** software developments have taken place within the R community, either in the form of new packages or by providing an R interface to existing software. This book attempts to give the reader a gentle introduction to graphical modeling using R and the main features of some of these packages.

** In addition, the book provides** examples of how more advanced aspects of graphical modeling can be represented and handled within R. Topics covered in the seven chapters include graphical models for contingency tables, Gaussian and mixed graphical models, Bayesian networks and modeling high dimensional data.

R is a powerful tool for statistics, graphics, and statistical programming. It is used by tens of thousands of people daily to perform serious statistical analyses. It is a free, open source system whose implementation is the collective accomplishment of many intelligent, hard-working people. The objective of this book is to show how to work with different programming aspects of R. The emerging R developers and data science could have very good programming knowledge but might have limited understanding about R syntax and semantics.

**Key Features**

- Develop strategies to speed up your R code
- Tackle programming problems and explore both functional and object-oriented programming techniques
- Learn how to address the core problems of programming in R with the most popular R packages for common tasks

**What you will learn**

- Install R and its various IDE for a given platform along with installing libraries from different repositories and version control
- Learn about basic data structures in R and how to work with them
- Write customized R functions and handle recursions, exceptions in R environments