midR
What is tapply used for?
Updated May 24, 2026
Short answer
tapply applies functions over subsets of a vector.
Deep explanation
Useful for grouped computations.
Real-world example
Average salary by department.
Common mistakes
- Incorrect grouping factor usage.
Follow-up questions
- What is aggregate()
- How is it different from dplyr group_by?