This video quickly goes over the very basics of functions. It covers some strategies for writing good functions incuding handling missing arguments and exiting functions early using rlang.
By the end you'll know the basics of functions and how to write one.