The dplyr package provides functions that perform data manipulation operations oriented to explore and manipulate datasets. At the most basic level, the package functions refers to data manipulation “verbs” such as select, filter, mutate, arrange, summarize among others that allow to chain multiple steps in a few lines of code. The dplyr package is suitable to work with a single dataset as well as to achieve complex results in large datasets.
Aggregates in R
Consider a data frame
inventoryfor an athletics store with columns
productcontains the names of different athletic equipment the store has in inventory and
pricegives the prices of the equipment. Complete the code to find the average price of the items sold by the store.