Ch. 1 - How to write a function

Why you should use functions

Calling functions

The benefits of writing functions

Converting scripts into functions

Converting a script to a function

Your first function: tossing a coin

Inputs to functions

Multiple inputs to functions

Y kant I reed ur code?

Data or detail?

Renaming GLM


Ch. 2 - All about arguments

Default arguments

Numeric defaults

Logical defaults

NULL defaults

Categorical defaults

Passing arguments between functions

Harmonic mean

Dealing with missing values

Passing arguments with …

Checking arguments

Throwing errors with bad arguments

Custom error logic

Fixing function arguments


Ch. 3 - Return values and scope

Returning values from functions

Returning early

Returning invisibly

Returning multiple values from functions

Returning many things

Returning metadata

Environments

Creating and exploring environments

Do variables exist?

Scope and precedence

Can a function find its variables?

Can you access variables from inside functions?

Variable precedence 1

Variable precedence 2


Ch. 4 - Case study on grain yields

Grain yields and unit conversion

Converting areas to metric 1

Converting areas to metric 2

Converting yields to metric

Applying the unit conversion

Visualizing grain yields

Plotting yields over time

A nation divided

Plotting yields over time by region

Modeling grain yields

Running a model

Making yield predictions

Do it all over again

Congratulations


About Michael Mallari

Michael is a hybrid thinker and doer—a byproduct of being a StrengthsFinder “Learner” over time. With nearly 20 years of engineering, design, and product experience, he helps organizations identify market needs, mobilize internal and external resources, and deliver delightful digital customer experiences that align with business goals. He has been entrusted with problem-solving for brands—ranging from Fortune 500 companies to early-stage startups to not-for-profit organizations.

Michael earned his BS in Computer Science from New York Institute of Technology and his MBA from the University of Maryland, College Park. He is also a candidate to receive his MS in Applied Analytics from Columbia University.

LinkedIn | Twitter | michaelmallari.com