
Last chance! 50% off unlimited learning
Sale ends in
IdentifyA(x, ...)
"IdentifyA" (formula, data, subset, poly = FALSE, ...)
"IdentifyA" (x, y = NULL, poly = FALSE, ...)
formula
, such as y ~ x
specifying x and y values.
Here the formula must be entered that was used to create the scatterplot.formula
should be taken.TRUE
and select all desired points. The polygon will be closed
automatically when finished.
IdentifyA
."cond"
.identify
, locator
## Not run:
# # 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")
# ## End(Not run)
Run the code above in your browser using DataLab