Hi Martin, Certainly there are some problems with the "ken.sto" function.... In addition there are some considerations that you have to take into account before using this code. For instance, it projects the data onto a principal component space prior sampling. In this case you have to a PCA is really necessary for your data. Second, this function uses the Euclidean distance (ED) as metric for selecting the samples. By using the ED directly on the PCs, the PCs with high explained variance will “dominate” the measurements. In this case is better to standardize the PCs prior ED computation or use the Mahalanobis distance. Whatever, I have modified the “ken.sto” code and now seems to be that it works for your data ;-) . If you still need it just drop me an e-mail. Regards,
Leonardo Ramirez-Lopez, Researcher Georges Lemaître Centre for Earth and Climate Research Earth and Life Institute Université Catholique de Louvain, 3 Place Louis Pasteur 1348, Louvain la Neuve Belgium e-mail: leonardo.rami...@uclouvain.be http://www.uclouvain.be/en-teclim.html Ph.D Researcher Physical Geography and Soil Science Institute of Geography University of Tübingen Rümelinstr. 19-23 72070 Tübingen Germany http://www.geographie.uni-tuebingen.de/ -- View this message in context: http://r.789695.n4.nabble.com/problems-with-method-ken-sto-in-package-soil-spec-subscript-out-of-bounds-tp4288193p4306689.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.