# NOT RUN {
## generate data
## in order to pass CRAN pretest, n is set to be small.
X <- aux.gensamples(dname="twinpeaks",n=28)
## 1. connecting 10% of data for graph construction.
output1 <- do.lpp(X,ndim=2,type=c("proportion",0.10))
## 2. constructing 25%-connected graph
output2 <- do.lpp(X,ndim=2,type=c("proportion",0.25))
## 3. constructing half-connected graph as binarized
output3 <- do.lpp(X,ndim=2,type=c("proportion",0.5),weight=FALSE)
## Visualize three different projections
if ((!is.na(output1))&&(!is.na(output2))&&(!is.na(output3))){
par(mfrow=c(1,3))
plot(output1$Y[,1],output1$Y[,2],main="5%")
plot(output2$Y[,1],output2$Y[,2],main="25%")
plot(output3$Y[,1],output3$Y[,2],main="50%")
} else {
message("* do.lpp : example : one of three trials must have failed.")
}
# }
Run the code above in your browser using DataLab