79440707

Date: 2025-02-14 22:57:39
Score: 1
Natty:
Report link

A simple assignment in terra creates a shallow copy, meaning that the original object can be changed if the derived one is edited. The solution if you want to avoid that behaviour is to use deepcopy. The documentation of deepcopy shows a similar behaviour for time as you discovered for extent: https://rspatial.github.io/terra/reference/deepcopy.html

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Andrea Manica