I have spatial data (polygons) and I want to create a mean based on the three columns. I think I must create a new column to calculate the mean based on the three existing columns.
Asked
Active
Viewed 43 times
0
-
4Welcome to SO. You should add a [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example), so it'll be a lot easier to help you. Use `sf` package to read your polygons. Then you can use `mutate` from `dplyr`. – patL Jun 20 '19 at 08:11
-
See `?rowMeans`. – Rui Barradas Jun 20 '19 at 08:33
-
library(raster) library (rgdal) library (sf) balprof – Alex.V Jun 20 '19 at 08:34