Answers for "using custom function in r"

R
0

custom function in r

# create custom function 

addition <- function(x) { 
y <- x + 1			
print(y) 

} 


z <- 2
addition(z)  # call new function on variable, z
> 3    # R returns the new value created by function
Posted by: Guest on March-30-2021

Browse Popular Code Answers by Language