I have a shapefile with polygons with an associated variable that can take different values. I would like to extract the borders between polygons of differing value (red and blue) as a polyline (dark black line).
I would prefer solutions in R but will accept other open source solutions.