R Programming for Data Science (The Course) (The Course)
Free!
Minimum price
$20.00
Suggested price

Course Info

This course includes 1 attempt.

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.

If you are interested in a printed copy of this book, you can purchase one at Lulu.

Share

Course Material

  • 1: Introduction
  • 1.1: Stay in Touch!
  • 1.2: Preface
  • 2: History and Overview of R
  • 2.1: What is R?
  • 2.2: What is S?
  • 2.3: The S Philosophy
  • 2.4: Back to R
  • 2.5: Basic Features of R
  • 2.6: Free Software
  • Artboard 3 Created with Sketch.
    Exercise 1
  • 2.7: Design of the R System
  • Artboard 3 Created with Sketch.
    Exercise 2
  • 2.8: Limitations of R
  • Artboard 3 Created with Sketch.
    Exercise 3
  • 2.9: R Resources
  • 2.9.1: Official Manuals
  • 2.9.2: Useful Standard Texts on S and R
  • 2.9.3: Other Resources
  • icon/quiz Created with Sketch.
    Quiz 11 attempt allowed
  • 3: Getting Started with R
  • 3.1: Installation
  • 3.2: Getting started with the R interface
  • 4: R Nuts and Bolts
  • 4.1: Entering Input
  • Artboard 3 Created with Sketch.
    Exercise 4
  • 4.2: Evaluation
  • Artboard 3 Created with Sketch.
    Exercise 5
  • 4.3: R Objects
  • Artboard 3 Created with Sketch.
    Exercise 6
  • 4.4: Numbers
  • Artboard 3 Created with Sketch.
    Exercise 7
  • 4.5: Attributes
  • Artboard 3 Created with Sketch.
    Exercise 8
  • 4.6: Creating Vectors
  • Artboard 3 Created with Sketch.
    Exercise 9
  • 4.7: Mixing Objects
  • Artboard 3 Created with Sketch.
    Exercise 10
  • 4.8: Explicit Coercion
  • 4.9: Matrices
  • Artboard 3 Created with Sketch.
    Exercise 11
  • 4.10: Lists
  • Artboard 3 Created with Sketch.
    Exercise 12
  • 4.11: Factors
  • Artboard 3 Created with Sketch.
    Exercise 13
  • 4.12: Missing Values
  • Artboard 3 Created with Sketch.
    Exercise 14
  • 4.13: Data Frames
  • Artboard 3 Created with Sketch.
    Exercise 15
  • 4.14: Names
  • 4.15: Summary
  • Artboard 3 Created with Sketch.
    Exercise 16
  • icon/quiz Created with Sketch.
    Quiz 21 attempt allowed
  • 5: Getting Data In and Out of R
  • 5.1: Reading and Writing Data
  • Artboard 3 Created with Sketch.
    Exercise 17
  • 5.2: Reading Data Files with read.table()
  • Artboard 3 Created with Sketch.
    Exercise 18
  • 5.3: Reading in Larger Datasets with read.table
  • Artboard 3 Created with Sketch.
    Exercise 19
  • 5.4: Calculating Memory Requirements for R Objects
  • Artboard 3 Created with Sketch.
    Exercise 20
  • icon/quiz Created with Sketch.
    Quiz 31 attempt allowed
  • 6: Using the readr Package
  • Artboard 3 Created with Sketch.
    Exercise 21
  • icon/quiz Created with Sketch.
    Quiz 41 attempt allowed
  • 7: Using Textual and Binary Formats for Storing Data
  • Artboard 3 Created with Sketch.
    Exercise 22
  • 7.1: Using dput() and dump()
  • Artboard 3 Created with Sketch.
    Exercise 23
  • 7.2: Binary Formats
  • Artboard 3 Created with Sketch.
    Exercise 24
  • icon/quiz Created with Sketch.
    Quiz 51 attempt allowed
  • 8: Interfaces to the Outside World
  • 8.1: File Connections
  • Artboard 3 Created with Sketch.
    Exercise 25
  • 8.2: Reading Lines of a Text File
  • Artboard 3 Created with Sketch.
    Exercise 26
  • 8.3: Reading From a URL Connection
  • Artboard 3 Created with Sketch.
    Exercise 27
  • icon/quiz Created with Sketch.
    Quiz 61 attempt allowed
  • 9: Subsetting R Objects
  • 9.1: Subsetting a Vector
  • Artboard 3 Created with Sketch.
    Exercise 28
  • 9.2: Subsetting a Matrix
  • 9.2.1: Dropping matrix dimensions
  • Artboard 3 Created with Sketch.
    Exercise 29
  • 9.3: Subsetting Lists
  • Artboard 3 Created with Sketch.
    Exercise 30
  • 9.4: Subsetting Nested Elements of a List
  • Artboard 3 Created with Sketch.
    Exercise 31
  • 9.5: Extracting Multiple Elements of a List
  • Artboard 3 Created with Sketch.
    Exercise 32
  • 9.6: Partial Matching
  • Artboard 3 Created with Sketch.
    Exercise 33
  • 9.7: Removing NA Values
  • Artboard 3 Created with Sketch.
    Exercise 34
  • icon/quiz Created with Sketch.
    Quiz 71 attempt allowed
  • 10: Vectorized Operations
  • Artboard 3 Created with Sketch.
    Exercise 35
  • 10.1: Vectorized Matrix Operations
  • Artboard 3 Created with Sketch.
    Exercise 36
  • icon/quiz Created with Sketch.
    Quiz 81 attempt allowed
  • 11: Dates and Times
  • 11.1: Dates in R
  • Artboard 3 Created with Sketch.
    Exercise 37
  • 11.2: Times in R
  • Artboard 3 Created with Sketch.
    Exercise 38
  • 11.3: Operations on Dates and Times
  • Artboard 3 Created with Sketch.
    Exercise 39
  • 11.4: Summary
  • Artboard 3 Created with Sketch.
    Exercise 40
  • icon/quiz Created with Sketch.
    Quiz 91 attempt allowed
  • 12: Managing Data Frames with the dplyr package
  • 12.1: Data Frames
  • 12.2: The dplyr Package
  • 12.3: dplyr Grammar
  • 12.3.1: Common dplyr Function Properties
  • Artboard 3 Created with Sketch.
    Exercise 41
  • 12.4: Installing the dplyr package
  • Artboard 3 Created with Sketch.
    Exercise 42
  • 12.5: select()
  • Artboard 3 Created with Sketch.
    Exercise 43
  • 12.6: filter()
  • Artboard 3 Created with Sketch.
    Exercise 44
  • 12.7: arrange()
  • Artboard 3 Created with Sketch.
    Exercise 45
  • 12.8: rename()
  • Artboard 3 Created with Sketch.
    Exercise 46
  • 12.9: mutate()
  • Artboard 3 Created with Sketch.
    Exercise 47
  • 12.10: group_by()
  • Artboard 3 Created with Sketch.
    Exercise 48
  • 12.11: %>%
  • Artboard 3 Created with Sketch.
    Exercise 49
  • 12.12: Summary
  • icon/quiz Created with Sketch.
    Quiz 101 attempt allowed
  • 13: Control Structures
  • 13.1: if-else
  • Artboard 3 Created with Sketch.
    Exercise 50
  • 13.2: for Loops
  • 13.3: Nested for loops
  • Artboard 3 Created with Sketch.
    Exercise 51
  • 13.4: while Loops
  • 13.5: repeat Loops
  • Artboard 3 Created with Sketch.
    Exercise 52
  • 13.6: next, break
  • Artboard 3 Created with Sketch.
    Exercise 53
  • 13.7: Summary
  • Artboard 3 Created with Sketch.
    Exercise 54
  • icon/quiz Created with Sketch.
    Quiz 111 attempt allowed
  • 14: Functions
  • 14.1: Functions in R
  • Artboard 3 Created with Sketch.
    Exercise 55
  • 14.2: Your First Function
  • Artboard 3 Created with Sketch.
    Exercise 56
  • 14.3: Argument Matching
  • Artboard 3 Created with Sketch.
    Exercise 57
  • 14.4: Lazy Evaluation
  • 14.5: The ... Argument
  • Artboard 3 Created with Sketch.
    Exercise 58
  • 14.6: Arguments Coming After the ... Argument
  • Artboard 3 Created with Sketch.
    Exercise 59
  • 14.7: Summary
  • Artboard 3 Created with Sketch.
    Exercise 60
  • icon/quiz Created with Sketch.
    Quiz 121 attempt allowed
  • 15: Scoping Rules of R
  • 15.1: A Diversion on Binding Values to Symbol
  • Artboard 3 Created with Sketch.
    Exercise 61
  • 15.2: Scoping Rules
  • Artboard 3 Created with Sketch.
    Exercise 62
  • 15.3: Lexical Scoping: Why Does It Matter?
  • Artboard 3 Created with Sketch.
    Exercise 63
  • 15.4: Lexical vs. Dynamic Scoping
  • Artboard 3 Created with Sketch.
    Exercise 64
  • 15.5: Application: Optimization
  • Artboard 3 Created with Sketch.
    Exercise 65
  • 15.6: Plotting the Likelihood
  • Artboard 3 Created with Sketch.
    Exercise 66
  • 15.7: Summary
  • icon/quiz Created with Sketch.
    Quiz 131 attempt allowed
  • 16: Coding Standards for R
  • Artboard 3 Created with Sketch.
    Exercise 67
  • icon/quiz Created with Sketch.
    Quiz 141 attempt allowed
  • 17: Loop Functions
  • 17.1: Looping on the Command Line
  • Artboard 3 Created with Sketch.
    Exercise 68
  • 17.2: lapply()
  • Artboard 3 Created with Sketch.
    Exercise 69
  • 17.3: sapply()
  • Artboard 3 Created with Sketch.
    Exercise 70
  • 17.4: split()
  • Artboard 3 Created with Sketch.
    Exercise 71
  • 17.5: Splitting a Data Frame
  • Artboard 3 Created with Sketch.
    Exercise 72
  • 17.6: tapply
  • Artboard 3 Created with Sketch.
    Exercise 73
  • 17.7: apply()
  • Artboard 3 Created with Sketch.
    Exercise 74
  • 17.8: Col/Row Sums and Means
  • Artboard 3 Created with Sketch.
    Exercise 75
  • 17.9: Other Ways to Apply
  • Artboard 3 Created with Sketch.
    Exercise 76
  • 17.10: mapply()
  • Artboard 3 Created with Sketch.
    Exercise 77
  • 17.11: Vectorizing a Function
  • Artboard 3 Created with Sketch.
    Exercise 78
  • 17.12: Summary
  • icon/quiz Created with Sketch.
    Quiz 151 attempt allowed
  • 18: Regular Expressions
  • 18.1: Before You Begin
  • 18.2: Primary R Functions
  • Artboard 3 Created with Sketch.
    Exercise 79
  • 18.3: grep()
  • Artboard 3 Created with Sketch.
    Exercise 80
  • 18.4: grepl()
  • Artboard 3 Created with Sketch.
    Exercise 81
  • 18.5: regexpr()
  • Artboard 3 Created with Sketch.
    Exercise 82
  • 18.6: sub() and gsub()
  • Artboard 3 Created with Sketch.
    Exercise 83
  • 18.7: regexec()
  • Artboard 3 Created with Sketch.
    Exercise 84
  • 18.8: The stringr Package
  • Artboard 3 Created with Sketch.
    Exercise 85
  • 18.9: Summary
  • Artboard 3 Created with Sketch.
    Exercise 86
  • icon/quiz Created with Sketch.
    Quiz 161 attempt allowed
  • 19: Debugging
  • 19.1: Something’s Wrong!
  • Artboard 3 Created with Sketch.
    Exercise 87
  • 19.2: Figuring Out What’s Wrong
  • Artboard 3 Created with Sketch.
    Exercise 88
  • 19.3: Debugging Tools in R
  • Artboard 3 Created with Sketch.
    Exercise 89
  • 19.4: Using traceback()
  • Artboard 3 Created with Sketch.
    Exercise 90
  • 19.5: Using debug()
  • Artboard 3 Created with Sketch.
    Exercise 91
  • 19.6: Using recover()
  • Artboard 3 Created with Sketch.
    Exercise 92
  • 19.7: Summary
  • Artboard 3 Created with Sketch.
    Exercise 93
  • icon/quiz Created with Sketch.
    Quiz 171 attempt allowed
  • 20: Profiling R Code
  • 20.1: Using system.time()
  • Artboard 3 Created with Sketch.
    Exercise 94
  • 20.2: Timing Longer Expressions
  • Artboard 3 Created with Sketch.
    Exercise 95
  • 20.3: The R Profiler
  • Artboard 3 Created with Sketch.
    Exercise 96
  • 20.4: Using summaryRprof()
  • Artboard 3 Created with Sketch.
    Exercise 97
  • 20.5: Summary
  • Artboard 3 Created with Sketch.
    Exercise 98
  • icon/quiz Created with Sketch.
    Quiz 181 attempt allowed
  • 21: Simulation
  • 21.1: Generating Random Numbers
  • Artboard 3 Created with Sketch.
    Exercise 99
  • 21.2: Setting the random number seed
  • 21.3: Simulating a Linear Model
  • Artboard 3 Created with Sketch.
    Exercise 100
  • 21.4: Random Sampling
  • Artboard 3 Created with Sketch.
    Exercise 101
  • 21.5: Summary
  • Artboard 3 Created with Sketch.
    Exercise 102
  • icon/quiz Created with Sketch.
    Quiz 191 attempt allowed
  • 22: Data Analysis Case Study: Changes in Fine Particle Air Pollution in the U.S.
  • 22.1: Synopsis
  • 22.2: Loading and Processing the Raw Data
  • 22.2.1: Reading in the 1999 data
  • 22.2.2: Reading in the 2012 data
  • Artboard 3 Created with Sketch.
    Exercise 103
  • 22.3: Results
  • 22.3.1: Entire U.S. analysis
  • 22.3.2: Changes in PM levels at an individual monitor
  • 22.3.3: Changes in state-wide PM levels
  • Artboard 3 Created with Sketch.
    Exercise 104
  • icon/quiz Created with Sketch.
    Quiz 201 attempt allowed
  • 23: Parallel Computation
  • 23.1: Hidden Parallelism
  • 23.1.1: Parallel BLAS
  • Artboard 3 Created with Sketch.
    Exercise 105
  • 23.2: Embarrassing Parallelism
  • Artboard 3 Created with Sketch.
    Exercise 106
  • 23.3: The Parallel Package
  • 23.3.1: mclapply()
  • 23.3.2: Error Handling
  • Artboard 3 Created with Sketch.
    Exercise 107
  • 23.4: Example: Bootstrapping a Statistic
  • 23.4.1: Generating Random Numbers
  • 23.4.2: Using the boot package
  • 23.5: Building a Socket Cluster
  • 23.6: Summary
  • icon/quiz Created with Sketch.
    Quiz 211 attempt allowed
  • 24: Why I Indent My Code 8 Spaces
  • 25: About the Author

Instructors

    • 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.

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 earnedover $14 millionwriting, 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