My pleasure! Let me see what I can do. I have some older videos where I use map functions to replace loops. Thankfully the ability to vectorize functions like we did within this loop prevent a lot of need for nested loops
You can certainly grow the list, which really isn't a problem if you don't think it will be long. Alternatively, I've also seen people initialize a list that's larger than you think it will be and then prune it after you know how big it actually should be
Thanks Pat. You're doing a great service for experienced and new coders alike.
Hey Marc - my pleasure, keep watching!
Thanks Pat, I have enjoyed with your series of using R base functions. It will be useful for us if you record another episode about nested loops in R
My pleasure! Let me see what I can do. I have some older videos where I use map functions to replace loops. Thankfully the ability to vectorize functions like we did within this loop prevent a lot of need for nested loops
Hey Pat,
What is the best practice when you want to populate a list but you don’t know upfront how long this might grow?
What you do in this case?
You can certainly grow the list, which really isn't a problem if you don't think it will be long. Alternatively, I've also seen people initialize a list that's larger than you think it will be and then prune it after you know how big it actually should be
helpful video