xy <- matrix(round(rnorm(100, 0, 5), 2), ncol=2)
(cep <- getCEP(xy, dstTarget=25, conversion='m2cm'))
# plot points, center and circles indicating 90\%-CEP estimates
ctr <- colMeans(xy) # center point
plot(xy, pch=16, asp=1)
drawCircle(ctr[1], ctr[2], cep$RAND["unit", "50%"], fg='blue')
drawCircle(ctr[1], ctr[2], cep$RAND["unit", "90%"], fg='green3')
points(ctr[1], ctr[2], pch=4, col="red", cex=2)
legend(x="bottomleft", legend=c("RAND 50", "RAND 90", "center"),
col=c("blue", "green3", "red"), lwd=c(2, 2, 2),
lty=c(1, 1, NA), pch=c(NA, NA, 4), bg="white")
Run the code above in your browser using DataLab