Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

r pipe

# %>% or is called the forward pipe operator in R
# It provides a mechanism for chaining commands with a new pipe operator, %>%.
# It forwards a value, or the result of an expression, into the next 
#function call/expression.
# It is R's alternative to nested functions or indented code block.
datafram1 = dataframe2 %>% #dataframe1 -> object in this pipe, dataframe2 -> result.
	filter(column1=2.5) %>%
	arrange(column2) %>%
	group_by(column3)      #end of pipe. the result variable name is dataframe2.
 
PREVIOUS NEXT
Tagged: #pipe
ADD COMMENT
Topic
Name
2+1 =