Problem with correlog() function in

xy=cbind(posf$longitude, posf$latitude)
pgi.cor <- correlog(xy, posf$log_odds, method="Moran", nbclass=10)   

Error in dnearneigh(coords[-zero, ], breaks[i, 1], breaks[i, 2]) : 
non-positive number of rows in x
stop("non-positive number of rows in x")
dnearneigh(coords[-zero, ], breaks[i, 1], breaks[i, 2])
correlog(xy, posf$log_odds, method = "Moran", nbclass = 10)

Welcome, and sorry about your problem! It's not clear what you're trying to do and what issue you're having, also we don't have access to the data in your example.

A good way to pose this kind of question is with a reproducible example (FAQ: What's a reproducible example (`reprex`) and how do I create one?). It really helps folks here help you out.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.