Introduction to R: Functions
You can go a long way in R doing data science using functions built into the base language or available in packages, but sooner or later you'll probably need to write custom code to perform an operation that is not available in a prepackaged function. In this lesson, we learn how to create new functions in R.
This is lesson 12 of a 30-part introduction to the R programming language for data analysis and predictive modeling. Link to the code notebook below:
Introduction to R: Functions https://www.kaggle.com/hamelg/intro-to-r-part-12-functions
Previous lesson on control flow: https://www.youtube.com/watch?v=h2zPmHhzmzo
This guide does not assume any prior exposure to R, programming or data science. It is intended for beginners with an interest in data science and those who might know other programming languages and would like to learn R.
I will create the videos for this guide such that you should be able to learn a lot just watching on YouTube, but to get the most out of the guide, it is recommended that you create a Kaggle account so that you can fork and edit each lesson so that you can follow along and run code yourself.
Follow DataDaft on social media for news and updates:
Twitter: https://twitter.com/DataDaft
Introduction to R Playlist:
https://www.youtube.com/playlist?list=PLiC1doDIe9rDjk9tSOIUZJU4s5NpEyYtE
Other Videos By DataDaft
| 2019-09-06 | How to Read csv Data Into R |
| 2019-09-05 | Introduction to R: Plotting with ggplot2 |
| 2019-09-04 | How To Use ifelse in R |
| 2019-09-03 | Introduction to R: Plotting in Base R |
| 2019-08-28 | Introduction to R: Frequency Tables |
| 2019-08-27 | Introduction to R: Merging Data |
| 2019-08-23 | Introduction to R: Dealing With Dates |
| 2019-08-21 | Introduction to R: Preparing Numeric Data |
| 2019-08-20 | Introduction to R: Working with Text Data |
| 2019-08-13 | Introduction to R: Exploring and Preparing Data |
| 2019-08-12 | Introduction to R: Functions |
| 2019-08-09 | Introduction to R: Control Flow |
| 2019-08-07 | Introduction to R: Reading and Writing Data |
| 2019-08-06 | Introduction to R: Factors |
| 2019-08-05 | Introduction to R: Data Frames |
| 2019-07-15 | Introduction to R: Lists |
| 2019-07-12 | Introduction to R: Matrices |
| 2019-07-11 | Introduction to R: Vectors |
| 2019-07-10 | Introduction to R: Variables |
| 2019-07-09 | Introduction to R: Atomic Data Types |
| 2019-07-08 | Introduction to R: R Arithmetic |

