For the assignment on pipe operator
1. Use the built-in data set iris. Using the pipe operator, group the flowers by their Species.
2. Summarise the grouped data by the mean of Sepal.Length and Sepal.Width.
How can I summarise 2 variables at the same time in same row
R Pipe-Operator 12-13 min 20-30 sec
As far as I understand, you want to have something like the command given below:
iris %>% group_by(Species) %>% summarise(mean(Sepal.Length), mean(Sepal.Width)) %>% View()
It is giving the error:
Error in iris %>% group_by(Species) %>% summarise(mean(Sepal.Length), :
could not find function "%>%"