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
-
1
Overview of R and RStudio -
2
Installing R and RStudio on Linux -
3
Installing R and RStudio on Windows -
4
Introduction to basics of R -
5
Introduction to Data Frames in R -
6
Introduction to RStudio -
7
Introduction to R script -
8
Working directories in RStudio -
9
Indexing and Slicing Data Frames -
10
Creating Matrices using Data Frames -
11
Operations on Matrices and Data Frames -
12
Merging and Importing Data -
13
Data types and Factors -
14
Lists and its Operations -
15
Plotting Histograms and Pie Chart -
16
Plotting Bar Charts and Scatter Plot -
17
Introduction to ggplot2 -
18
Aesthetic Mapping in ggplot2 -
19
Data Manipulation using dplyr Package -
20
More Functions in dplyr Package -
Pipe Operator -
22
Conditional Statements -
23
Functions 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