Start Learning for Free

Join over 1,000,000 other Data Science learners and start one of our interactive tutorials today!

Topic r small

"Writing Functions in R" from Hadley & Charlotte Wickham!

July 12th, 2016 in R Programming

Learn from the creator of ggplot2, dplyr, and more! Whether you're a seasoned veteran or R novice, DataCamp’s latest course will help you make your code more readable, avoid coding errors, and automate repetitive tasks.

Start For Free

Like all DataCamp courses, Writing Functions in R is self-paced and combines high-quality video, in-browser coding, and gamification to make your learning experience fun.

What you’ll learn

Hadley & Charlotte will teach you the fundamentals of writing functions in R so that, among other things, you can make your code more readable, avoid coding errors, and automate repetitive tasks.

In the first chapter, you’ll review the syntax of writing a function in R, the basic data types in R, subsetting and writing for loops. [Start First Chapter For Free] Next, we focus on when it makes sense to write a function, how to get started and what to keep in mind when you are writing your own functions.

In the third chapter, you’ll learn how to use the map functions in the purrr package. This will enable you to solve new iteration problems with greater ease. The fourth chapter takes your understanding of purrr one step further and illustrates how to deal with functions that might return an error, how to iterate over multiple arguments and how to iterate over functions that have no output at all. The final chapter is about writing functions that don't surprise you or your users. Learn which functions you should avoid using inside of a function and which you should use with care.

Start For Free


I started to take the course; however, the instruction to the exercise were so bad and unclear that I am not going to continue. I have taken the other R Programming Courses and they were so much better.
08/06/16 12:33 PM |
Really? I had a completely different experience. The exercises left a lot more up to me and didn't feel as baby fed. However the do require a pretty good working knowledge of R, that you would get from taking intro & intermediate R, not to mention application outside of DC
08/08/16 4:33 PM |