How do I fix a bad:alloc error in for loop when using the terra package? I hope that everyone is doing well today 🙂