undrift: Reverse drift correction performed on an itrackR object

Description Usage Arguments Value See Also Examples

Description

In case you want to undo the drift correction performed by drift_correct. It puts fixations back to original coordinates and deletes obj$transform.

Usage

1
undrift(obj)

Arguments

obj

an itrackR object

Value

All fixations in obj$fixations are adjusted back to original coordinates. obj$transform is deleted.

See Also

drift_correct

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
## Not run: 
# itrackr.data('edfs') returns full path to 2 edf files
z <- itrackr(edfs=itrackr.data('edfs'))

#Extracts messages like "BLOCK 1", and "TRIAL 7" and creates variables "Block" and "Trial", giving them values
# 1 and 7.
z <- set_index(z,c('Block', 'Trial'), patterns=c('BLOCK [0-9]*', 'TRIAL [0-9][0-9]*), numeric.only = TRUE)

beh <- itrackr.data('beh)

z <- add_behdata(z,beh)

#fixations before correcting
plot(z)

#perform drift correction for each subject and Block.
z <- drift_correct(z, vars=c('Block'))

#after correcting
plot(z)


#never mind
z <- undrift(z)

#back to normal
plot(z)


## End(Not run)

jashubbard/itrackR documentation built on May 18, 2019, 4:53 p.m.