Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

R Function Syntax

# Declare function “f” with parameters “x”, “y“
# that returns a linear combination of x and y.
f <- function(x, y) {
  z <- 3 * x + 4 * y
  return(z) ## the return() function is optional here
}
Source by en.wikipedia.org #
 
PREVIOUS NEXT
Tagged: #R #Function #Syntax
ADD COMMENT
Topic
Name
9+1 =