The apply family consists of vectorized functions which minimize your need to explicitly create loops. These functions will apply a specified function to a data object and their primary difference is in the object class in which the function is applied to (list vs. matrix, etc) and the object class that will be returned from the function.
apply()for matrices and data frameslapply()for lists…output as listsapply()for lists…output simplifiedtapply()for vectors- Other useful “apply-like” functions (e.g.
mapply,rapply, &vapply)