Loop Functions
lapply
list <- list(a = 1:10, b = 10:100)
lapply(list, mean)lapply(1:10, runif, min = 0, max = 10)sapply
> lapply(list, mean)
$a
[1] 5.5
$b
[1] 55
> sapply(list,mean)
a b
5.5 55.0apply
mapply
tapply
Last updated