best.r {ForagingOrg}R Documentation

Best-r index for foraging organization

Description

Calculates best-r indicator from a set of x and y coordinates. Best-r is defined as the best Pearson correlation (in absolute value) between the order in which targets are collected and their respective x and y coordinates (Ólafsdóttir et al., 2021; Woods et al., 2013).

Usage

best.r(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

Returns the best-r as a numeric value.

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.

best.r(X,Y)

[Package ForagingOrg version 0.1.0 Index]