Download presentation
Presentation is loading. Please wait.
1
Functions Maria Novosolov
2
One of the greatest advantages of R
functions One of the greatest advantages of R
3
Basic syntax of a function
A function needs to have: A name A body of code
4
Remember The important idea behind functions is that objects that are created within the function are local to the environment of the function - they don't exist outside of the function. But… you can “return” the value of the object from the function, meaning pass the value of it into the global environment.
5
General structure of a function
name.of.function <- function(argument1, argument2) { statements return(something) }
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.