Skip to content
Prev 2342 / 29559 Next

map algebra with ascii grid

On Sun, 15 Jul 2007, Tim Keitt wrote:

            
Tim,

While there is something in your suggestion, my understanding of the White 
Book (1992) introduction of data frames is that they are lists of vectors 
of varying types but of equal lengths, and that they should play well with 
formulae. The current Spatial*DataFrame do indeed do this, and you can use 
them with model.frame() inside for example lm(), gstat(), and generally 
almost everywhere a real data frame is needed as a data= argument. I 
cannot recall ever using an arithmetic operation on a data frame myself, 
although I may be an exception (I coerse to matrix).

Rather than trying to inherit from data.frame, the methods ($,[, [[, and 
assignment versions) provide data.frame operability.

Certainly I can see that there are differences of approach here, 
especially if remote sensing data are never going to have factors (unlike 
say GIS integration, where categorical data do occur). The exchange on the 
list earlier today (about why read.table() returns a data.frame and by 
default converts a character vector to a factor) seems to back me up (from 
my point of view, of course!).

Best wishes,

Roger