Congratulations

Introduction to Writing Functions in R

Richie Cotton

Data Evangelist at DataCamp

In Chapter 1 you learned

  • Writing your own functions lets you reuse code.
  • There is a simple process for turning scripts into functions.
  • Data arguments come before detail arguments.
Introduction to Writing Functions in R

In Chapter 2 you learned

  • Defaults can be set using name = value syntax.
  • Arguments can be passed between functions using their name or ....
  • Checking user inputs can be done using assertive.
Introduction to Writing Functions in R

In Chapter 3 you learned

  • You can return early from a function using return().
  • You can prevent return values being printed with invisible().
  • Functions can return multiple values using lists or attributes.
  • R has rules about scope that determine which variables can be seen.
Introduction to Writing Functions in R

In Chapter 4 you learned

  • Writing your own functions can be useful for your data analyses.
  • Even simple, one-line functions can be helpful.
Introduction to Writing Functions in R

More modeling

Logistic Regression is covered in

  • Introduction to Regression in R
  • Intermediate Regression in R
  • Generalized Linear Models in R

Generalized additive models are covered in

  • Nonlinear Modeling in R with GAMs
Introduction to Writing Functions in R

Tidying models

Tidying models with broom is covered in

  • Case Study: Exploratory Data Analysis in R
  • Machine Learning in the Tidyverse
  • Reshaping Data with tidyr
Introduction to Writing Functions in R

Unit testing

Unit testing code is covered in

  • Developing R Packages
Introduction to Writing Functions in R

Environments

Environments are covered in

  • Object-Oriented Programming with S3 and R6 in R
Introduction to Writing Functions in R

Thanks for taking the course!

Introduction to Writing Functions in R

Preparing Video For Download...