Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

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 
 
PREVIOUS NEXT
Tagged: #custom #function
ADD COMMENT
Topic
Name
1+1 =