You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The names returned by terra::predict() are partially dependent upon the value provided to index. My testing suggests that if index isn't provided, then any names returned by fun are used; if index is provided and the return has the same number of bands as the input raster, names of the input raster are used (even if that band wasn't used for calculations); and if index is longer than the number of input bands, the default lyr.1-type names are used.
I think ideally any names returned by fun would be preserved, irrespective of index.
Problem
The names returned by
terra::predict()
are partially dependent upon the value provided toindex
. My testing suggests that ifindex
isn't provided, then any names returned byfun
are used; ifindex
is provided and the return has the same number of bands as the input raster, names of the input raster are used (even if that band wasn't used for calculations); and ifindex
is longer than the number of input bands, the defaultlyr.1
-type names are used.I think ideally any names returned by
fun
would be preserved, irrespective ofindex
.reprex
Created on 2023-06-21 with reprex v2.0.2
Session info
The text was updated successfully, but these errors were encountered: