nbrs_sum | R Documentation |
Add sum of neighbors values to SF object
nbrs_sum(sf_object, unique_id_col, variable, date_col)
sf_object |
An object of class 'SF' |
unique_id_col |
A string identifying a unique column to serve as an identifier |
variable |
A string identifying a numeric variable |
date_col |
(Optional) A string identifying a variable for date, use if data is over multiple time periods. |
Column string of neighbors
panel_example_sf <- nbrs_sum(sf_object = panel_example_sf, unique_id_col = "country", variable = "gdp", date_col="year") panel_example_sf <- nbrs_sum(panel_example_sf, "country", "gdp", "year") cross_section_example_sf <- nbrs_sum(sf_object = cross_section_example_sf, unique_id_col = "country", variable = "gdp") cross_section_example_sf <- nbrs_sum(cross_section_example_sf, "country", "gdp")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.