What is "apply"

In R this function returns a vector or matrix or list of values obtained by applying a function in the margins or dimensions of a matrix. The apply function has advantages over loops in terms of code simplicity and speed.