Hi Bart,

Even after putting the variables in the apply function, the results come not 
right:

library (alphahull)
DT=data.frame(x=c(0.25,0.25,0.75,0.75),y=c(0.25,0.75,0.75,0.25))
Hull <- ahull(DT, alpha = 0.5)

TEST<- data.frame(x=c(0.25,0.5),y=c(0.5,0.5))
plot(Hull)
points(TEST)

InHul2D <- function(Val1, Val2, Hull) inahull(Hull, p = c(Val1, Val2))

IN <- apply(TEST, 1, function(x,y) InHul2D("x","y",Hull))


        [[alternative HTML version deleted]]

______________________________________________
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.

Reply via email to