Skip to content
Prev 1376 / 29559 Next

extending sp classes

On Fri, 6 Oct 2006, Roger Bivand wrote:

            
The missing bit, after providing an as.data.frame method for your class, 
was to either specify the zcol= argument:

spplot(ex, zcol=c("x", "y", "z"))

or provide a names() method for your class:

names.myclass <- function(x) names(x at data)
spplot(ex)

The next > 0.9-2 release of sp will remove the as.data.frame() problem, 
but a names() method will be needed if zcol= cannot be used.

Roger