Search
 
SCRIPT & CODE EXAMPLE
 

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 
Comment

PREVIOUS NEXT
Code Example
R :: r dictionary 
R :: convert datetime from string r 
R :: how to substring in R from position 
R :: r seq 
R :: r merge by two columns 
R :: skewness in r 
R :: write text r 
R :: r replace na with 0 
R :: convert string to lowercase R 
R :: R extract regex from string 
R :: get matrix row name r 
R :: count number of columns in r 
R :: looping over R dictionary 
R :: r function to get class of all columns 
R :: r for loop 
R :: empty environment r 
R :: elseif r 
R :: how to enter character string with quotes in r 
R :: select last child with class in r 
R :: Significance codes 
R :: save link tweet in new column in R 
R :: How to remove duplicates based on the combinations of two columns r 
Rust :: rust reverse range 
Rust :: char byte size rust 
Rust :: rust how to access elements of an array 
Rust :: calculator in rust 
Rust :: armanriazi•rust•smartpointer•box•cons 
Rust :: armanriazi•rust•thread•spawin•move•capture 
Rust :: rust•armanriazi•lifetime•unsafe•destructor 
Rust :: armanriazi•rust•trait•bound 
ADD CONTENT
Topic
Content
Source link
Name
5+9 =