Description Usage Arguments Value See Also Examples
Create regions of interest (ROIs) for an itrackR object. ROIs can be circular, elliptical, or polygons. After creating ROIs, you use calcHits
to determine whether each fixation/saccade fell within each ROI. The helper functions radialCoords
and roiFlower
can be used to
generate coordinates around some set of coordinates.
1 2 3 |
obj |
an itrackR object |
coords |
data frame or matrix specifying x and y coordinates for the center of each ROI (default = (0,0), upper-left corner) |
shapes |
shape for each ROI listed, can be |
radius |
for circular ROIs, radius of the circle (in pixels) |
xradius |
for elliptical ROIs, radius along the x dimension |
yradius |
for elliptical ROIs, radius along the y dimension |
angles |
for elliptical ROIs, rotation for each ROI in degrees. |
names |
optional, name for each ROI. Defaults to 1 to number of ROIs listed. ROIs should not have duplicate names! |
polygon |
for polygonal ROIS, data frame or matrix specifying corners of polygon |
append |
whether we're adding to our list of ROIs or overwriting (default = FALSE, overwrite) |
ROI information is stored in obj$rois
. Uses the spatstat
package to store ROI information.
To get ROI information as a data frame, you can use the internal function roi2df
. ROIs can be plotted using plot.rois
.
plot.rois
radialCoords
roiFlower
calcHits
1 2 3 4 5 6 7 8 9 10 11 12 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.