[R-sig-Geo] Warning when stacking, masking or cropping raster objects

Adam H Sparks adamhsparks at gmail.com
Tue May 10 08:39:24 CEST 2016


Hi all,
I'm working on a vignette from the R-OpenSci auunconf,
https://github.com/saundersk1/auunconf16/blob/master/Vignette%20BoM.Rmd,
and am suddenly getting warning messages where I've never had any before
with this process.

In the "Australian Water Availability Project (AWAP)" section, at the very
end of the file, some grid files are downloaded and saved and GADM level 2
data are fetched to do cropping and masking.

Two weeks ago when we put this together it all worked with no error
messages. Today as I'm working on cleaning up the vignette I'm getting
error messages I've never seen before when doing these things.

For example, the line:
cfiles <- stack(dir(pattern = "grid$"))

Now returns these warning messages:
Warning messages:
1: In `[<-`(`*tmp*`, j, value = <S4 object of class "RasterLayer">) :
  implicit list embedding of S4 objects is deprecated
2: In `[<-`(`*tmp*`, j, value = <S4 object of class "RasterLayer">) :
  implicit list embedding of S4 objects is deprecated
3: In `[<-`(`*tmp*`, j, value = <S4 object of class "RasterLayer">) :
  implicit list embedding of S4 objects is deprecated
4: In `[<-`(`*tmp*`, j, value = <S4 object of class "RasterLayer">) :
  implicit list embedding of S4 objects is deprecated
5: In `[<-`(`*tmp*`, j, value = <S4 object of class "RasterLayer">) :
  implicit list embedding of S4 objects is deprecated
6: In `[<-`(`*tmp*`, j, value = <S4 object of class "RasterLayer">) :
  implicit list embedding of S4 objects is deprecated
7: In `[<-`(`*tmp*`, nl, value = r) :
  implicit list embedding of S4 objects is deprecated

When I try to mask I get similar messages about the implicit list embedding
of S4 objects being deprecated.

For now in the vignette I've suppressed the warning messages as the code
appears to work, it just gives these warnings, but I'd like to understand
why I'm getting them.



-- 
Adam Sparks
Associate Professor Field Crops Pathology
Centre for Crop Health
University of Southern Queensland
Toowoomba, QLD, AU

@adamhsparks <https://twitter.com/adamhsparks>

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list