Using the ice cream products data, we can find the average rating for each brand.

library(data.table)
myDF <- fread("/anvil/projects/tdm/data/icecream/combined/products.csv")

We take the rating (in the rating column), group the data according to the brand (in the brand column), and take an average of these reviews:

tapply(myDF$rating, myDF$brand, mean)