Pipe Operator - English
- Questions posted on Forums
- R Tutorials - English
-
Assignment
Not able to find the mean of sepal length and sepal width.Following output is obtained . iris %>% group_by(Species) %>% summarise(mean(Sepal.Length) %>% summarise(mean(Sepal.Width))+
11-12M 20-30SMay 14, 2025, 2:43 p.m. Joohi
-
group_by()
gr_dramaMov <- group_by(dramaMov, mpaa_rating)When I checked the gr_dramaMov dataframe after execution of above line , they don't appear to be grouped like "R" rated would be closer to one another , "PG-13" rated would be closer to one another and so on..
06-07M 30-40SMay 15, 2025, 1:24 a.m. DVB
-
Pipe operator
For the assignment on pipe operator1. 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
12-13M 20-30SMay 15, 2025, 4:04 p.m. sakshi.khanna@juit.ac.in
-
1Overview of R and RStudio
-
2Installing R and RStudio on Linux
-
3Installing R and RStudio on Windows
-
4Introduction to basics of R
-
5Introduction to Data Frames in R
-
6Introduction to RStudio
-
7Introduction to R script
-
8Working directories in RStudio
-
9Indexing and Slicing Data Frames
-
10Creating Matrices using Data Frames
-
11Operations on Matrices and Data Frames
-
12Merging and Importing Data
-
13Data types and Factors
-
14Lists and its Operations
-
15Plotting Histograms and Pie Chart
-
16Plotting Bar Charts and Scatter Plot
-
17Introduction to ggplot2
-
18Aesthetic Mapping in ggplot2
-
19Data Manipulation using dplyr Package
-
20More Functions in dplyr Package
-
Pipe Operator
-
22Conditional Statements
-
23Functions in R
Questions posted on ST Forums:
Outline:
About summarise function in dplyr About group_by function in dplyr Difference between summarise and group_by functions Use summarise and group_by functions together About pipe operator Examples of pipe operator Benefits of pipe operator Use ggplot2 and dplyr package using pipe operator Plot a boxplot Use count in summarise function