Below is my data set.
To find mean for entire column (Column Name: BP) I have achieved it using the below R code
library(Sleuth3)
ex0112
View(ex0112)
mean(ex0112$BP)
But how do I calculate the mean (of BP) for only the Regular Oil Diet? I am new to R programming. Your help is highly appreciated