Memory management in R by delayed assignments