“Writing Functions in R” from Hadley & Charlotte Wickham!

July 13, 2016
By

(This article was first published on DataCamp Blog, and kindly contributed to R-bloggers)

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

To leave a comment for the author, please follow the link and comment on their blog: DataCamp Blog.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)