1

I'm attempting to rotate a stacked raster using the raster package in R. The raw stacked raster looks like this:

raw_raster

When I attempt to rotate the raster to change the longitudinal scale from 0-360 to -180-180, I get this warning message:

Warning message: In .local(x, ...) : this does not look like an appropriate object for this function

However, the transformation does go forward, giving me:

proc_raster

What's the warning about?

  • 1
    It's a warning, not an error, and as you said the transformation is performed anyway. I get this warning every time I use this function and I'm not sure why since it seems to be exactly the appropriate object for the function. You can see the conditions that trigger this warning in lines 17-22 in the source code: github.com/rspatial/raster/blob/master/R/rotate.R – Jacob F Feb 11 at 15:48
  • The author @Robert Hijmans appears to be on this site. Not sure if this comment will bring the question to their attention. – smiller Feb 11 at 16:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.