
Last chance! 50% off unlimited learning
Sale ends in
Find the direction away from the closest point
thigmophobe(x,y,plot.span=par("usr"),xlog=par("xlog"),ylog=par("ylog"))
Numeric data vectors. Typically the x/y coordinates of plotted points. If arrays are passed, they will be silently coerced to numeric vectors.
The extent of the plot in user units.
Flags for logarithmic axes. See Note.
A vector of directions away from the point nearest to each point.
thigmophobe returns the direction (as 1|2|3|4 - see pos= in text) away from the nearest point to each of the points described by x and y.
# NOT RUN {
x<-rnorm(10)
y<-rnorm(10)
thigmophobe(x,y)
# }
Run the code above in your browser using DataLab