[R] mutlidimensional in.convex.hull(wasmultidimensionalpoint.in.polygon??)
k.jewell at campden.co.uk
Fri Dec 18 16:05:00 CET 2009
Syntax suggestions implemented.
Inhull's original author consulted.
Function submitted for potential inclusion in geometry package.
Seasons greetings to all.
"baptiste auguie" <baptiste.auguie at googlemail.com> wrote in message
news:de4e29f50912180238m45c4b7c3g792113d5b6c4c7ae at mail.gmail.com...
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) # columns in calpts
# and other similar lines could be replaced with
# can probably be written
# center = apply(calpts, 2, mean)
# more efficient
Would you consider submitting this function to the maintainer of the
geometry package, after checking it's OK with inhull's original
More information about the R-help