For each fixation in a fixation report, this function will determine the nearest Point of Interest and the fixation's distance from that Point of Interest.
nearestPOI(fixReport, poiList, supplement = TRUE)
A fixation Report as may be created by
fixReport(). Must contain columns xpos
and ypos
.
A data.frame containing x,y coordinates for Points
of Interest. The data.frame must contain exactly two columns,
named xpos
and ypos
, in that order.
If TRUE, nearestPOI() will return a data.frame consisting of fixReport suplemented with columns nearestpoi and dist2poi. If FALSE return a 2 column data.frame with just those two columns.
A data.frame including columns nearestpoi and dist2poi.
For each fixation in a fixation report, this function will determine the nearest Point of Interest and the fixation's distance from that Point of Interest.
The value of supplement
determines whether to return
the POI values within an enriched version of fixReport
,
or as a simple two column data.frame.