Syntax suggestions implemented. Inhull's original author consulted. Function submitted for potential inclusion in geometry package.
Seasons greetings to all. Keith Jewell --------------------------------- "baptiste auguie" <baptiste.aug...@googlemail.com> wrote in message news:de4e29f50912180238m45c4b7c3g792113d5b6c4c...@mail.gmail.com... Hi, Excellent, thanks for doing this! I had tried the 2D case myself but I was put off by the fact that Octave's convhulln had a different ordering of the points to R's geometry package (an improvement to Octave's convhulln was made after it was ported to R). I'm not sure how you got around this but it's good to see that the result was worth the effort! Below are a few minor syntax suggestions, # p <- dim(calpts)[2] # columns in calpts # and other similar lines could be replaced with ncol(calpts) nrow(testpts) nrow(hull) # length(degenflag[degenflag]) # can probably be written sum(degenflag) # center = apply(calpts, 2, mean) # more efficient colMeans(calpts) Would you consider submitting this function to the maintainer of the geometry package, after checking it's OK with inhull's original author? Best regards, baptiste ______________________________________________ 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.