if (FALSE) {
# run the example via copy and paste
plot(temperature ~ delivery_min, data=d.pizza)
idx <- IdentifyA(temperature ~ delivery_min, data=d.pizza)
# you selected the following points
d.pizza[idx,]
points(temperature ~ delivery_min, data = d.pizza[idx,], col="green")
# use the attr("cond") for subsets in code
attr(idx, "cond")
# create a group variable for the found points
d.pizza$grp <- seq(nrow(d.pizza)) %in% idx
# try the polygon option
idx <- IdentifyA(temperature ~ delivery_min, data=d.pizza, poly=TRUE)
points(temperature ~ delivery_min, data = d.pizza[idx,], col="red")
}
Run the code above in your browser using DataLab