05:48duration 5 minutes 48 seconds
Repeatedly Applying Functions to Data - Part 2…
Repeatedly Applying Functions to Data - Part 2 (lapply() and sapply())
While tapply() applies a function to different observations in a vector, which might correspond to rows in a data frame, lapply() and sapply() apply a function to each element of a list. In the case…