# NOT RUN {
## 2D artifical data
set.seed(1984)
n <- 15
c1 <- data.frame(x = rnorm(n, -0.2, sd = 0.2), y = rnorm(n, -2, sd = 0.2))
c2 <- data.frame(x = rnorm(n, -1.1, sd = 0.15), y = rnorm(n, -2, sd = 0.3))
c3 <- c(0.55, -2.4)
d <- rbind(c1, c2, c3)
d <- as.data.frame(d)
## MST:
out <- ComputeMST(d)
out
## 2D plot:
plot(out)
# using different parameters
plot(out, col.pts = "blue", col.segts = "red", lty = 2)
# }
Run the code above in your browser using DataLab