R Tutorial

R Functions

Functions

Functions group reusable logic behind a name you can call anywhere.

greet <- function(name) paste("Hello,", name)
Try it Yourself
Run this R example in your local environment or course sandbox.