Presentation is loading. Please wait.

Presentation is loading. Please wait.

Functions Maria Novosolov.

Similar presentations


Presentation on theme: "Functions Maria Novosolov."— Presentation transcript:

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) }


Download ppt "Functions Maria Novosolov."

Similar presentations


Ads by Google