Learn R Programming

plotrix (version 2.1-5)

thigmophobe: Find the direction away from the closest point

Description

Find the direction away from the closest point

Usage

thigmophobe(x,y)

Arguments

x,y
Numeric data vectors. Typically the x/y coordinates of plotted points.

Value

  • A vector of directions away from the point nearest to each point.

Details

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.

See Also

thigmophobe.labels

Examples

Run this code
x<-rnorm(10)
 y<-rnorm(10)
 thigmophobe(x,y)

Run the code above in your browser using DataLab