Leanpub Header

Skip to main content

Mastering Software Development in R

This book covers R software development for building data science tools. This book provides rigorous training in the R language and covers modern software development practices for building tools that are highly reusable, modular, and suitable for use in a team-based environment or a community of developers. (Printed copies coming soon!)

This book is available in multiple packages!

Pick Your Package
PDF
EPUB
WEB
479
Pages
About

About

About the Book

The world of R has evolved substantially since its early days as a statistical computing language. As the field of data science has rocketed to the forefront of all areas of scientific and industry work, R has become the centerpiece language for doing data science. Through the contributions of a vibrant and highly active developer community, R has evolved to the point where it can be considered a software development language for developing robust, modular, and highly reusable software tools. 

We begin by providing a rigorous introduction to the R language, and quickly move on to more advanced aspects like functional programming, object-oriented programming, building R packages, and software maintainence. We also discuss the development of custom visualization tools through packages like ggplot2 and ggmap. 

This book is about using R to develop the tools for doing data science. Whether you are on a data science team or working by yourself as part of a community of developers or data scientists, you will find this book useful as a reference for the software development process in R. Throughout, we focus on the aspects of the R language that are relevant to developing code and tools that will be used by others. 

Printed copies of the book are available from Lulu (coming soon).

Packages

Pick Your Package

All packages include the ebook in the following formats: PDF, EPUB, and Web

The Book

Minimum price

Suggested price$20.00

Free!

    The Book + Code Files + Datasets

    Minimum price

    Suggested price$25.00

    This package provides in convenient form the code executed in the book as well as datasets needed to reproduce the examples. In addition, we include a complete HTML version of the book for browsing locally on your computer.

    $20.00

    • R Code Files
    • Datasets
    • HTML Book

    Author

    About the Authors

    Roger D. Peng

    Roger D. Peng is a Professor of Statistics and Data Sciences at the University of Texas, Austin. Previously, he was Professor of Biostatistics at the Johns Hopkins Bloomberg School of Public Health. His research focuses on the development of statistical methods for addressing environmental health problems and on developing tools for doing better data analysis. He is the author of the popular book R Programming for Data Science and 10 other books on data science and statistics. He is also the co-creator of the Johns Hopkins Data Science Specialization, the Simply Statistics blog where he writes about statistics for the public, the Not So Standard Deviations podcast with Hilary Parker, and The Effort Report podcast with Elizabeth Matsui. Roger is a Fellow of the American Statistical Association and is the recipient of the Mortimer Spiegelman Award from the American Public Health Association, which honors a statistician who has made outstanding contributions to public health. He can be found on Twitter and GitHub at @rdpeng.

    Leanpub Podcast

    Episode 16

    An Interview with Roger D. Peng

    Sean Kross

    Sean Kross is a software developer in the department of Biostatistics at the Johns Hopkins Bloomberg School of Public Health. Sean's professional interests range between metagenomics, cybersecurity, and human-computer interaction. He is also the lead developer of the swirl, a software package designed to teach programming, statistics, and data science in an authentic programming environment. You can find Sean on Twitter and GitHub at @seankross.

    Brooke Anderson

    Brooke Anderson is an Assistant Professor at Colorado State University in the Department of Environmental & Radiological Health Sciences, as well as a Faculty Associate in the Department of Statistics. She is also a member of the university’s Partnership of Air Quality, Climate, and Health and is a member of the editorial boards of Epidemiology and Environmental Health Perspectives. Previously, she completed a postdoctoral appointment in Biostatistics at Johns Hopkins Bloomberg School of Public and a PhD in Engineering at Yale University. Her research focuses on the health risks associated with climate-related exposures, including heat waves and air pollution, for which she has conducted several national-level studies. As part of her research, she has also published a number of open source R software packages to facilitate environmental epidemiologic research. 

    Contents

    Table of Contents

    Introduction

    1. Setup

    1.The R Programming Environment

    1. 1.1Crash Course on R Syntax
    2. 1.2The Importance of Tidy Data
    3. 1.3Reading Tabular Data with the readr Package
    4. 1.4Reading Web-Based Data
    5. 1.5Basic Data Manipulation
    6. 1.6Working with Dates, Times, Time Zones
    7. 1.7Text Processing and Regular Expressions
    8. 1.8The Role of Physical Memory
    9. 1.9Working with Large Datasets
    10. 1.10Diagnosing Problems

    2.Advanced R Programming

    1. 2.1Control Structures
    2. 2.2Functions
    3. 2.3Functional Programming
    4. 2.4Expressions & Environments
    5. 2.5Error Handling and Generation
    6. 2.6Debugging
    7. 2.7Profiling and Benchmarking
    8. 2.8Non-standard Evaluation
    9. 2.9Object Oriented Programming
    10. 2.10Gaining Your ‘tidyverse’ Citizenship

    3.Building R Packages

    1. 3.1Before You Start
    2. 3.2R Packages
    3. 3.3The devtools Package
    4. 3.4Documentation
    5. 3.5Data Within a Package
    6. 3.6Software Testing Framework for R Packages
    7. 3.7Passing CRAN checks
    8. 3.8Open Source Licensing
    9. 3.9Version Control and GitHub
    10. 3.10Software Design and Philosophy
    11. 3.11Continuous Integration
    12. 3.12Cross Platform Development

    4.Building Data Visualization Tools

    1. 4.1Basic Plotting With ggplot2
    2. 4.2Customizing ggplot2 Plots
    3. 4.3Mapping
    4. 4.4htmlWidgets
    5. 4.5The grid Package
    6. 4.6Building a New Theme
    7. 4.7Building New Graphical Elements

    About the Authors

    Get the free sample chapters

    Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

    The Leanpub 60 Day 100% Happiness Guarantee

    Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

    Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

    You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

    So, there's no reason not to click the Add to Cart button, is there?

    See full terms...

    Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

    We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

    (Yes, some authors have already earned much more than that on Leanpub.)

    In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

    Learn more about writing on Leanpub

    Free Updates. DRM Free.

    If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

    Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

    Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

    Learn more about Leanpub's ebook formats and where to read them

    Write and Publish on Leanpub

    You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

    Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

    Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

    Learn more about writing on Leanpub