R Function Syntax

[Solved] R Function Syntax | Php - Code Explorer | yomemimo.com
Question : R Function Syntax

Answered by : oldfashioned-okapi-ae6efth2ojsc

# 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 : https://en.wikipedia.org/wiki/R_(programming_language)#Comparison_with_alternatives | Last Update : Wed, 18 May 22

Answers related to r function syntax

Code Explorer Popular Question For Php