Skip to content
Prev 2944 / 29559 Next

index a SpatialGridDataFrame

Hi,

 I would like to add data to a SpatialGridDataFrame (SGDF) in a loop.

 Something like

 for (i in 1:20){
    ....
    SGDF[,,i] <- sgdf[,,1]
    }  # sgdf is a SpatialGridDataFrame which is modified in the loop

 I get the error message that it is not possible to index an object of type S4.

 Ok..., but how can I add data to a SGDF in a loop? No way?

Thanks for your help,
Ingo