<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="http://www.r-bloggers.com/writing-functions-in-r-from-hadley-charlotte-wickham/"></div></div><div><a data-url="http://www.r-bloggers.com/writing-functions-in-r-from-hadley-charlotte-wickham/" data-counturl="http://www.r-bloggers.com/writing-functions-in-r-from-hadley-charlotte-wickham/" data-count="horizontal" data-text="“Writing Functions in R” from Hadley &amp; Charlotte Wickham!" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://www.datacamp.com/community/blog/writing-functions-in-r-from-hadley-charlotte-wickham"> DataCamp Blog</a></strong>, and kindly contributed to <a rel="nofollow" href="http://www.r-bloggers.com/">R-bloggers)</a> </div>
<p dir="ltr">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.</p>
<p dir="ltr"><strong><a target="_blank" href="https://www.datacamp.com/courses/writing-functions-in-r/?tap_a=5644-dce66f&tap_s=10907-287229">Start For Free</a></strong></p>
<p dir="ltr">Like all DataCamp courses, <strong><a target="_blank" href="https://www.datacamp.com/courses/writing-functions-in-r/?tap_a=5644-dce66f&tap_s=10907-287229">Writing Functions in R</a></strong> is self-paced and combines high-quality video, in-browser coding, and gamification to make your learning experience fun.</p>
<p dir="ltr"><a target="_blank" href="https://www.datacamp.com/courses/writing-functions-in-r/?tap_a=5644-dce66f&tap_s=10907-287229"><b><img alt="" src="http://i1.wp.com/community.datacamp.com.s3.amazonaws.com/community/production/ckeditor_assets/pictures/75/content_16.png?w=456" data-recalc-dims="1"></b></a></p>
<p dir="ltr"><u><b>What you’ll learn</b></u></p>
<p dir="ltr">Hadley &amp; 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.</p>
<p dir="ltr">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. <a target="_blank" href="https://www.datacamp.com/courses/writing-functions-in-r/?tap_a=5644-dce66f&tap_s=10907-287229">[Start First Chapter For Free]</a> 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.</p>
<p dir="ltr">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.</p>
<p dir="ltr"><a target="_blank" href="https://www.datacamp.com/courses/writing-functions-in-r/?tap_a=5644-dce66f&tap_s=10907-287229">Start For Free</a></p>
<p><iframe height="315" width="450" allowfullscreen="allowfullscreen" src="https://www.youtube.com/embed/n0M-xm3DO8s"></iframe></p>
<p><div><div><div><div data-width="55" data-show-faces="false" data-send="true" data-layout="box_count" data-height="62" data-href="http://www.r-bloggers.com/writing-functions-in-r-from-hadley-charlotte-wickham/"></div></div><div><a data-url="http://www.r-bloggers.com/writing-functions-in-r-from-hadley-charlotte-wickham/" data-counturl="http://www.r-bloggers.com/writing-functions-in-r-from-hadley-charlotte-wickham/" data-count="vertical" data-text="“Writing Functions in R” from Hadley &amp; Charlotte Wickham!" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://www.datacamp.com/community/blog/writing-functions-in-r-from-hadley-charlotte-wickham"> DataCamp Blog</a></strong>.</div>
<hr>
<a rel="nofollow" href="http://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="http://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" rel="nofollow" href="http://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="http://www.r-bloggers.com/?s=data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="http://www.r-bloggers.com/?s=Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="http://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="http://www.r-bloggers.com/?s=map">maps</a>, <a title="Animation in R" rel="nofollow" href="http://www.r-bloggers.com/?s=animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="http://www.r-bloggers.com/?s=RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="http://www.r-bloggers.com/?s=sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="http://www.r-bloggers.com/?s=LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="http://www.r-bloggers.com/?s=SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="http://www.r-bloggers.com/?s=eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="http://www.r-bloggers.com/?s=git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="http://www.r-bloggers.com/?s=hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="http://www.r-bloggers.com/?s=Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="http://www.r-bloggers.com/?s=regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="http://www.r-bloggers.com/?s=PCA">PCA</a>, <a title="Time series" rel="nofollow" href="http://www.r-bloggers.com/?s=time+series">time series</a>, <a title="finance trading" rel="nofollow" href="http://www.r-bloggers.com/?s=trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/ZAvqy2KWC1E"></a></div>