[Rd] Set operation generics
Roger Bivand
Roger@B|v@nd @end|ng |rom nhh@no
Sat Dec 20 15:11:40 CET 2025
Interesting thread, but perhaps better moved elsewhere at some point?
The nb class is really only a list representing a by-row sparse matrix, one row per list component, with attributes and corner-case code to mark geometries with no neighbours for a given definition of neighbour. The set operations were contributed by Nicholas Lewin-Koh possibly in 2001, possibly before, but IIRC the question of generics was considered, but we didn't add standard generics ([, c, etc.). So although the underlying list class could be made a character vector, I think getting a valid nb object back out was the blocking point. It is worth raising as an issue in the spdep repo!
Roger
--
Roger Bivand
Emeritus Professor
Norwegian School of Economics
Postboks 3490 Ytre Sandviken, 5045 Bergen, Norway
Roger.Bivand using nhh.no
More information about the R-devel
mailing list