Closed cynthiahqy closed 1 year ago
Rather than classes, I think it makes the most sense to have a single xmap
class (i.e. xmap_df
), and everything else be "candidate links" -- which can be input into the as_xmap()
generic. Candidate links can also be validated as crossmaps, without coercion, allowing users to validate transformation objects in existing workflows.
Coercion into xmap
classes should be reserved for facilitating "advanced" or "extension" tasks --- i.e. visualisation, perturbation, multi-map transformations. Some xmap
class variants could include "long" or "short" formats for ggplot
; or recode/collapse variants which drop the weights columns (since it is implied).
Closing as separate issues will be created for necessary xmap variants and/or candidate link types
[x] add tests for
xmap_to_matrix()
, incl for dropping extra cols.[ ] read vignette from
spdep
again: https://r-spatial.github.io/spatialreg/articles/nb_igraph.htmlcreation of spatial weight matrix is similar to forming
xmap