eye_density.fixation_group | R Documentation |
This function computes a density map for a given fixation group using kernel density estimation.
## S3 method for class 'fixation_group'
eye_density(
x,
sigma = 50,
xbounds = c(min(x$x), max(x$x)),
ybounds = c(min(x$y), max(x$y)),
outdim = c(xbounds[2] - xbounds[1], ybounds[2] - ybounds[1]),
normalize = TRUE,
duration_weighted = FALSE,
window = NULL,
origin = c(0, 0)
)
x |
A fixation_group object. |
sigma |
The standard deviation of the kernel. Default is 50. |
xbounds |
The x-axis bounds. Default is the range of x values in the fixation group. |
ybounds |
The y-axis bounds. Default is the range of y values in the fixation group. |
outdim |
The output dimensions of the density map. Default is the difference between the xbounds and ybounds. |
normalize |
Whether to normalize the output map. Default is TRUE. |
duration_weighted |
Whether to weight the fixations by their duration. Default is FALSE. |
window |
The temporal window over which to compute the density map. Default is NULL. |
origin |
The origin of the coordinate system. Default is c(0,0). |
The function computes a density map for a given fixation group using the kde2d function from the MASS package. The density map is computed based on the x and y coordinates of the fixations, with optional weighting by their duration. The resulting density map can be normalized if desired.
An object of class c("eye_density", "density", "list") containing the computed density map and other relevant information.
Other eye_density:
eye_density()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.