0

Attempting to create a list of unique values, extracted from a column within a spatial polygons data frame object.

The unique function only works with vectors...

For example, if SPDF had a column name of "trees" with 5 records "birch", "birch", "aspen", "fir" and "pine". I would need a function that extracts unique values into a list.

dwiz
  • 410
  • 3
  • 16

1 Answers1

2

I think this should do it

unique(spatial_df[["trees"]])

novica
  • 655
  • 4
  • 11