meanITD {ForagingOrg}R Documentation

Mean Intertarget Distance (ITD) from x and y coordinates for target positions.

Description

Every pair of consecutively collected targets are at a certain Euclidean distance, which can be calculated from their respective x and y coordinates. The mean ITD is simply the mean of all these distances (Ólafsdóttir et al., 2021; Woods et al., 2013).

Usage

meanITD(x, y)

Arguments

x

A vector containing the x coordinates from the target locations.

y

A vector containing the y coordinates from the target locations.

Value

A numeric value with the Mean ITD.

Author(s)

Marcos Bella-Fernández

References

Ólafsdóttir, I. M., Gestdóttir, S., & Kristjánsson, Á. (2021) The development of foraging organization. Attention, Perception, & Psychophysics, 83, 2891-2904.

Woods, A. J., Göksun, T., Chatterjee, A., & Zelonis, S. (2013) The development of organized visual search. Acta Psychologica, 143, 191-199.

Examples

#Simulating target coordinates

n<-20 #Number of targets collected in the simulation.

X<-runif(n,0,150) #Simulating x coordinates.
Y<-runif(n,0,100) #Simulating y coordinates.

meanITD(X,Y)

[Package ForagingOrg version 0.1.0 Index]