na.rm: If na.rm = TRUE, any observations of x with NA values will be dropped from x and from w.
Returns
Returns a gg plot, a scatter plot with x on the horizontal and its spatially lagged values on the vertical axis (i.e. a Moran scatter plot).
Details
For details on the symbol parameters see the documentation for geom_point .
If any observations with no neighbors are found (i.e. any(Matrix::rowSums(w) == 0)) they will be dropped automatically and a message will print stating how many were dropped.
Examples
data(georgia)x <- georgia$income
w <- shape2mat(georgia,"W")moran_plot(x, w)