We have looked at basic looping with for(). See pages 104-105.
And we have discussed the apply() function. See pages 106-107.
Now we will discuss some further examples of related apply() functions.
- sapply() - lapply()
October 2, 2019
We have looked at basic looping with for(). See pages 104-105.
And we have discussed the apply() function. See pages 106-107.
Now we will discuss some further examples of related apply() functions.
- sapply() - lapply()
These are different from the apply() function. The apply() function works with vectors and matricies.
The lapply() function works with lists. So it expects a list and returns a list.
And the sapply() is a bit simpler in that it takes what it gets and trys to return the simplest structure it can.
See pages 106-109.
Dates are often
We will need to convert them to dates.