ex_polys <- lawn_data$polygons_aggregate
ex_pts <- lawn_data$points_aggregate
ex_agg <- list(c('sum','population','pop_sum'),
c('average','population','pop_average'),
c('count','','num_of_pts'))
lawn_aggregate(ex_polys, ex_pts, ex_agg)
Run the code above in your browser using DataLab