sp_to_geoda: Create a geoda object from a sp object

Description Usage Arguments Value

View source: R/sf_geoda.R

Description

The sp package has been an essential tool which provides spatial data-structures and many utility functions to do spatial analysis in R. It has been a core dependent library for many other packages, e.g. rgdal (IO), maptools (mapping), spdep (spatial weights, spatial statistics, and spatial models) etc. Using rgdal to read a ESRI Shapefile will return a sp (Spatial object) object, which could be either a SpatialPointsDataFrame (using an AttributeList for its data slot directly), a SpatialLinesDataFrame, or a SpatialPolygonsDataFrame.

Usage

1
sp_to_geoda(sp_obj, with_table = FALSE)

Arguments

sp_obj

An instance of sp object

with_table

Optional, Default: FALSE If create a table from sp dataframe object.

Value

geoda_obj An instance of GeoDa object


lixun910/rgeoda documentation built on March 19, 2021, 3:49 p.m.