Learn how to use the “apply()” function in R, to apply a function to all rows or columns of a data frame. The apply function essentially is a specialized loop function, although it is more efficient than a simple for-loop. You will also learn the use of the “ColMeans”, “ColSums”, “RowMeans”, and “RowSums” functions.
This video is a tutorial for programming in R Statistical Software for Statistics and Data Science beginners, using RStudio.
You can access the dataset (Stock Example Data) and R script (Apply Function) here: