# NOT RUN {
(TestMat <- matrix(c(1, 0, 1, 0, 1,
0, 1, 0, 1, 0,
1, 0, 1, 0, 1,
0, 1, 0, 1, 0,
1, 0, 1, 0, 1),
nrow =5))
# the code below should return -1
MoransI(TestMat, r1 = 1)
# }
Run the code above in your browser using DataLab