I know we're trying to reduce the number of function parameters, but I wanted to discuss the option to incorporate an option to save outputs natively in function execution instead of only returning an R object.
The use case is when someone needs to execute functions in CLI or other non-interactive sessions, they may want items saved to disk. Currently, certain objects (e.g. terra spatRast objects) cannot be saved as Rdata and need to be saved individually.
I know we're trying to reduce the number of function parameters, but I wanted to discuss the option to incorporate an option to save outputs natively in function execution instead of only returning an R object.
The use case is when someone needs to execute functions in CLI or other non-interactive sessions, they may want items saved to disk. Currently, certain objects (e.g. terra spatRast objects) cannot be saved as Rdata and need to be saved individually.
Currently, I do the following example:
This could be incorporated into the function that might provide a destination folder for outputs.