Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge develop to master for version 0.6.0 #4

Merged
merged 75 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
d025faa
added web files; introduced 'long' argument to AOI_seq
M1V0 Sep 4, 2024
2b7f654
added contributor to DESCRIPTION
M1V0 Sep 4, 2024
099be94
added web files
M1V0 Sep 4, 2024
5800edd
removed dependencies from AOI_seq()'
M1V0 Sep 10, 2024
792ec9f
removed dependencies from AOI_time()
M1V0 Sep 10, 2024
44ee65d
removed dependencies from fix_dispersion()
M1V0 Sep 10, 2024
650ab7b
minor edits around dependencies
M1V0 Sep 10, 2024
639449c
fixed minimum duration error in VTI_saccade
M1V0 Sep 11, 2024
f302f6e
changed minDur argument to min_dur for consistency across functions
M1V0 Sep 11, 2024
0653e2c
Create blah.txt
tombeesley Sep 11, 2024
07ce65c
Removed message function from VTI_saccade
M1V0 Sep 12, 2024
2282d80
Added Vignette images
M1V0 Sep 12, 2024
a640212
Merge branch 'develop' of https://github.com/tombeesley/eyetools into…
tombeesley Sep 16, 2024
1943127
init tests
M1V0 Sep 16, 2024
c660a78
create fix_inverse_saccade function
M1V0 Sep 16, 2024
92d3e24
update examples to dontrun{}
M1V0 Sep 16, 2024
4d8773b
Merge branch 'develop' of https://github.com/tombeesley/eyetools into…
tombeesley Sep 16, 2024
1ec2739
Update fix_inverse_saccade.R
M1V0 Sep 16, 2024
8cac156
Merge branch 'develop' of https://github.com/tombeesley/eyetools into…
tombeesley Sep 16, 2024
3fb056c
update_sketch
tombeesley Sep 16, 2024
325a371
Made progress bar optional
M1V0 Sep 17, 2024
4a70427
Update fix_inverse_saccade.Rd
M1V0 Sep 17, 2024
0335a52
Create compare_algorithms()
M1V0 Sep 18, 2024
27af1d5
Create hdf5_to_csv.R
M1V0 Sep 18, 2024
1f518ed
add new example data HCL
tombeesley Sep 18, 2024
0167ff5
Merge branch 'develop' of https://github.com/tombeesley/eyetools into…
tombeesley Sep 18, 2024
9c71044
Added smooth argument
M1V0 Sep 18, 2024
880e2de
Updated smooth in VTI and compare
M1V0 Sep 18, 2024
aecb106
Update test-AOI_seq.R
M1V0 Sep 18, 2024
3f6a373
renamed VTI_saccade
M1V0 Sep 18, 2024
7606a95
renamed spatial_plot and seq_plot
M1V0 Sep 18, 2024
fe1edfe
Update smoother.R
M1V0 Sep 18, 2024
74a4765
Update interpolate.R
M1V0 Sep 18, 2024
7156e93
Update hdf5_to_csv.R
M1V0 Sep 18, 2024
ec2e757
update to data files with correct cols
tombeesley Sep 18, 2024
553f6ee
Merge branch 'develop' of https://github.com/tombeesley/eyetools into…
tombeesley Sep 18, 2024
cad8de9
Merge remote-tracking branch 'refs/remotes/origin/develop' into develop
M1V0 Sep 18, 2024
d9a744d
update man files
M1V0 Sep 18, 2024
c1d1802
rename fixation functions
M1V0 Sep 18, 2024
46a5f16
add @return parameter
M1V0 Sep 18, 2024
ec6ce70
add return and fix example parameters
M1V0 Sep 18, 2024
f95d3ff
Create conditional_transform.R
M1V0 Sep 19, 2024
bf89bd8
update sketch
tombeesley Sep 19, 2024
14efa63
Merge branch 'develop' of https://github.com/tombeesley/eyetools into…
tombeesley Sep 19, 2024
c5a465c
made conditional_transform more general
tombeesley Sep 23, 2024
301d8bb
Update fixation_dispersion.R
M1V0 Sep 23, 2024
fd9c0cf
Create conditional_transform.Rd
M1V0 Sep 23, 2024
2e350fb
minor function updates
M1V0 Sep 23, 2024
eaa78a0
Update plot_spatial.Rd
M1V0 Sep 23, 2024
2d3fd16
Create test-conditional_transform.R
M1V0 Sep 23, 2024
f804c70
Update conditional_transform.R
M1V0 Sep 23, 2024
c798e39
Update fixation_VTI.R
M1V0 Sep 23, 2024
6e0a3b2
update conditional_transform
M1V0 Sep 23, 2024
0364e84
improved unit tests
M1V0 Sep 23, 2024
ff2f2aa
Update conditional_transform.R
M1V0 Sep 23, 2024
ceb4eeb
Create example_counterbalance.rda
M1V0 Sep 23, 2024
4f43f05
Update NAMESPACE
M1V0 Sep 23, 2024
f8da489
update conditional_transform inc description
tombeesley Sep 23, 2024
7bbf6be
update documentation
tombeesley Sep 23, 2024
d3fbea0
conditional_transform updates
M1V0 Sep 23, 2024
43688d4
Update conditional_transform.R
M1V0 Sep 23, 2024
f31b310
updated AOI_*() functions
M1V0 Sep 24, 2024
024a5b0
added stop() for poor AOI definitions
M1V0 Sep 24, 2024
de66a13
Default smooth = FALSE
M1V0 Sep 24, 2024
74844f5
Update fixation_VTI.R
M1V0 Sep 25, 2024
77819f3
Added comments and tidied up
M1V0 Sep 25, 2024
f331880
Update compare_algorithms.R
M1V0 Sep 25, 2024
5a07c8b
Update conditional_transform.R
M1V0 Sep 25, 2024
d6f0f4b
General updates and checks
M1V0 Sep 25, 2024
7abb7f1
removed example for now
M1V0 Sep 25, 2024
d31b165
Add hdf5 data and include in example
M1V0 Sep 25, 2024
762c3eb
Update README.Rmd
M1V0 Sep 26, 2024
c718d95
update fixation algorithms with comments and changes to documentation
tombeesley Sep 26, 2024
37b5658
Merge branch 'develop' of https://github.com/tombeesley/eyetools into…
tombeesley Sep 26, 2024
8900fff
Increment version number to 0.6.0
tombeesley Sep 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .Rbuildignore.rej

This file was deleted.

5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
**/.DS_Store
.Rproj.user
.Rhistory
.RData
.Ruserdata
<<<<<<< .merge_file_a05752
=======

>>>>>>> .merge_file_a13928
115,910 changes: 115,910 additions & 0 deletions 102_EG_dec.csv

Large diffs are not rendered by default.

120 changes: 120 additions & 0 deletions 102_training.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
1,1,1,6,1,1,0,1,2,1,2,0,0,6851.5,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
1,2,2,6,2,2,0,1,1,1,2,1,1,5435.8,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
1,3,1,5,1,1,0,1,2,2,2,0,0,14410,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
1,4,2,5,2,2,0,1,2,2,2,1,1,9056.1,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
2,1,1,6,1,1,0,1,1,1,1,1,1,3665.8,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
2,2,1,5,1,1,0,1,2,1,1,1,1,3927.5,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
2,3,2,6,2,2,0,1,1,2,2,1,1,4587.5,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
2,4,2,5,2,2,0,1,2,2,2,1,1,3322,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
3,1,1,6,1,1,0,1,2,2,1,1,1,2941.1,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
3,2,2,5,2,2,0,1,2,1,2,1,1,2927.5,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
3,3,2,6,2,2,0,1,1,1,2,1,1,4729.9,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
3,4,1,5,1,1,0,1,2,2,1,1,1,5613.9,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
4,1,2,6,2,2,0,1,2,1,2,1,1,3467,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
4,2,1,6,1,1,0,1,2,1,1,1,1,2544,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
4,3,1,5,1,1,0,1,2,2,2,0,0,6611.6,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
4,4,2,5,2,2,0,1,2,2,2,1,1,2346.2,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
5,1,1,5,1,1,0,1,1,1,1,1,1,2597.7,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
5,2,2,5,2,2,0,1,2,1,2,1,1,4035.5,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
5,3,1,6,1,1,0,1,1,2,1,1,1,2490.8,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
5,4,2,6,2,2,0,1,2,2,2,1,1,2359.2,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
6,1,2,5,2,2,0,1,1,1,2,1,1,2829.1,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
6,2,1,6,1,1,0,1,1,2,1,1,1,2132.2,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
6,3,1,5,1,1,0,1,2,2,1,1,1,3456.4,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
6,4,2,6,2,2,0,1,1,1,2,1,1,2518.1,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
7,1,1,5,1,1,0,1,1,2,1,1,1,2209.2,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
7,2,1,6,1,1,0,1,1,1,1,1,1,2201,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
7,3,2,6,2,2,0,1,1,2,2,1,1,2866.7,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
7,4,2,5,2,2,0,1,1,1,2,1,1,3399.9,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
8,1,1,6,1,1,0,1,1,1,1,1,1,3415.6,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
8,2,2,6,2,2,0,1,2,2,2,1,1,2528.3,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
8,3,1,5,1,1,0,1,1,2,1,1,1,1852.3,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
8,4,2,5,2,2,0,1,2,1,2,1,1,2585.2,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
9,1,2,6,2,2,0,1,1,1,2,1,1,5202.7,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
9,2,1,5,1,1,0,1,2,1,1,1,1,2098.5,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
9,3,2,5,2,2,0,1,2,2,2,1,1,2695,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
9,4,1,6,1,1,0,1,2,2,1,1,1,2220.4,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
10,1,2,5,2,2,0,1,1,1,2,1,1,2979.6,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
10,2,2,6,2,2,0,1,2,1,2,1,1,2509.6,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
10,3,1,5,1,1,0,1,1,2,1,1,1,2066.3,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
10,4,1,6,1,1,0,1,2,2,1,1,1,1943.5,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
11,1,1,5,1,1,0,1,1,2,1,1,1,2632.5,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
11,2,2,6,2,2,0,1,1,1,2,1,1,2104.6,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
11,3,1,6,1,1,0,1,1,2,1,1,1,2060.4,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
11,4,2,5,2,2,0,1,2,1,2,1,1,2562.2,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
12,1,2,6,2,2,0,1,1,2,2,1,1,2260.9,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
12,2,1,6,1,1,0,1,1,1,1,1,1,2203.8,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
12,3,1,5,1,1,0,1,1,2,1,1,1,1732.5,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
12,4,2,5,2,2,0,1,1,1,2,1,1,2263.1,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
13,1,2,6,2,2,0,1,2,1,2,1,1,2077.8,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
13,2,1,6,1,1,0,1,1,2,1,1,1,1996,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
13,3,1,5,1,1,0,1,2,2,1,1,1,1955.4,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
13,4,2,5,2,2,0,1,1,1,2,1,1,1767.2,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
14,1,1,6,1,1,0,1,2,1,1,1,1,1960.4,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
14,2,2,5,2,2,0,1,2,2,2,1,1,2906.3,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
14,3,2,6,2,2,0,1,1,1,2,1,1,2239,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
14,4,1,5,1,1,0,1,1,2,1,1,1,2797.5,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
15,1,2,5,2,2,0,1,1,1,2,1,1,2342.9,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
15,2,1,5,1,1,0,1,2,2,1,1,1,3610.4,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
15,3,1,6,1,1,0,1,2,1,1,1,1,2323,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
15,4,2,6,2,2,0,1,2,2,2,1,1,2206.1,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
16,1,2,5,2,2,0,1,1,2,2,1,1,2145.8,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
16,2,1,6,1,1,0,1,2,1,1,1,1,2052.2,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
16,3,1,5,1,1,0,1,1,1,1,1,1,2531.1,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
16,4,2,6,2,2,0,1,2,2,2,1,1,2727.2,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
17,1,1,5,1,1,0,1,2,1,1,1,1,1939.2,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
17,2,1,6,1,1,0,1,2,2,1,1,1,2155,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
17,3,2,5,2,2,0,1,2,1,2,1,1,2189.2,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
17,4,2,6,2,2,0,1,2,2,2,1,1,1893.6,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
18,1,2,5,2,2,0,1,2,2,2,1,1,2832.4,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
18,2,2,6,2,2,0,1,1,2,2,1,1,2016.5,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
18,3,1,5,1,1,0,1,2,1,1,1,1,2077,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
18,4,1,6,1,1,0,1,2,1,1,1,1,3512.4,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
19,1,2,6,2,2,0,1,2,1,2,1,1,2043.1,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
19,2,1,5,1,1,0,1,1,1,1,1,1,4994.7,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
19,3,2,5,2,2,0,1,1,2,2,1,1,1746.2,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
19,4,1,6,1,1,0,1,1,2,1,1,1,1597.7,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
20,1,1,5,1,1,0,1,1,2,1,1,1,1774.2,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
20,2,2,6,2,2,0,1,2,2,2,1,1,2025.4,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
20,3,2,5,2,2,0,1,1,1,2,1,1,1775.5,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
20,4,1,6,1,1,0,1,1,1,1,1,1,1713.6,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
21,1,2,6,2,2,0,1,2,2,2,1,1,1783.7,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
21,2,1,6,1,1,0,1,1,2,1,1,1,1721.1,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
21,3,1,5,1,1,0,1,1,1,1,1,1,1796.3,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
21,4,2,5,2,2,0,1,1,1,2,1,1,1700.8,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
22,1,1,5,1,1,0,1,1,1,1,1,1,1578.6,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
22,2,2,6,2,2,0,1,1,1,2,1,1,2058.8,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
22,3,2,5,2,2,0,1,1,2,2,1,1,1818.6,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
22,4,1,6,1,1,0,1,2,2,1,1,1,1921.8,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
23,1,1,5,1,1,0,1,2,1,1,1,1,1612.9,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
23,2,2,6,2,2,0,1,2,1,2,1,1,1917.8,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
23,3,2,5,2,2,0,1,2,2,2,1,1,2233,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
23,4,1,6,1,1,0,1,2,2,1,1,1,1648.4,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
24,1,2,5,2,2,0,1,1,1,2,1,1,1598.9,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
24,2,1,6,1,1,0,1,1,2,1,1,1,2041.4,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
24,3,2,6,2,2,0,1,1,1,2,1,1,1864.9,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
24,4,1,5,1,1,0,1,2,2,1,1,1,1877.7,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
1,1,4,8,4,4,0,2,2,1,3,0,0,6288,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
1,2,3,7,3,3,0,2,2,2,3,1,1,2994.8,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
1,3,1,5,3,3,0,1,1,2,4,0,0,5428.2,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
1,4,2,6,4,4,0,1,1,1,4,1,1,3338.4,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
2,1,4,8,4,4,0,2,1,2,4,1,1,11572,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
2,2,3,7,3,3,0,2,2,1,3,1,1,3491.9,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
2,3,1,5,3,3,0,1,2,2,4,0,0,8609.4,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
2,4,2,6,4,4,0,1,2,1,4,1,1,4559.9,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
3,1,3,7,3,3,0,2,1,2,3,1,1,5720.9,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
3,2,2,6,4,4,0,1,1,2,4,1,1,4540,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
3,3,4,8,4,4,0,2,2,1,3,0,0,5133.6,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
3,4,1,5,3,3,0,1,1,1,3,1,1,4455.2,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
4,1,3,7,3,3,0,2,1,1,4,0,0,5837.2,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
4,2,4,8,4,4,0,2,1,2,4,1,1,12227,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
4,3,2,6,4,4,0,1,2,1,4,1,1,4334.7,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
4,4,1,5,3,3,0,1,2,2,3,1,1,2457.2,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
5,1,2,6,4,4,0,1,2,1,4,1,1,3976.1,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
5,2,1,5,3,3,0,1,1,2,3,1,1,2544.3,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
5,3,4,8,4,4,0,2,1,2,4,1,1,6234.9,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
5,4,3,7,3,3,0,2,1,1,3,1,1,3650.3,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
6,1,2,6,4,4,0,1,1,2,4,1,1,3014.3,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
6,2,1,5,3,3,0,1,2,2,3,1,1,1671,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
6,3,4,8,4,4,0,2,2,1,4,1,1,2717.2,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
6,4,3,7,3,3,0,2,2,1,3,1,1,2945.3,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15,1.3751e+15
17 changes: 10 additions & 7 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
Type: Package
Package: eyetools
Title: Tools for eye data analysis
Version: 0.5.1
Author: Tom Beesley
Maintainer: Tom Beesley <t.beesley@lancaster.ac.uk>
Version: 0.6.0
Authors@R: c(
person("Beesley", "Tom", email = "t.beesley@lancaster.ac.uk", role = c("aut", "cre")),
person("Ivory", "Matthew", email = "matthew.ivory@lancaster.ac.uk", role = "aut"))
Description: A set of tools for eye data processing. The intended flow is
from data processing, to fixation analysis, to data visualisation and
trial level summaries.
Expand All @@ -15,6 +16,7 @@ Imports:
ggforce,
ggplot2,
glue,
hdf5r,
lifecycle,
magick,
magrittr,
Expand All @@ -26,11 +28,12 @@ Imports:
zoo
Suggests:
knitr,
rmarkdown
VignetteBuilder:
knitr
rmarkdown,
testthat (>= 3.0.0)
VignetteBuilder: knitr
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.2
RoxygenNote: 7.3.1
URL: https://tombeesley.github.io/eyetools/
Config/testthat/edition: 3
25 changes: 18 additions & 7 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,33 +1,44 @@
# Generated by roxygen2: do not edit by hand

export("%>%")
export(AOI_seq)
export(AOI_time)
export(VTI_saccade)
export(combine_eyes)
export(compare_algorithms)
export(conditional_transform)
export(dist_to_visual_angle)
export(fix_dispersion)
export(fixation_VTI)
export(fixation_dispersion)
export(hdf5_to_csv)
export(interpolate)
export(seq_plot)
export(plot_seq)
export(plot_spatial)
export(saccade_VTI)
export(smoother)
export(spatial_plot)
import(dplyr)
import(ggforce)
import(ggplot2)
import(hdf5r)
import(rlang)
importFrom(dplyr,between)
importFrom(glue,glue)
importFrom(lifecycle,deprecated)
importFrom(magick,image_read)
importFrom(magrittr,"%>%")
importFrom(pbapply,pblapply)
importFrom(rlang,.data)
importFrom(stats,aggregate)
importFrom(stats,complete.cases)
importFrom(stats,cor.test)
importFrom(stats,dist)
importFrom(stats,loess)
importFrom(stats,median)
importFrom(stats,na.exclude)
importFrom(stats,na.omit)
importFrom(stats,predict)
importFrom(stats,reshape)
importFrom(stats,setNames)
importFrom(stats,time)
importFrom(utils,head)
importFrom(utils,stack)
importFrom(utils,tail)
importFrom(zoo,na.approx)
importFrom(zoo,na.spline)
importFrom(zoo,na.trim)
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# eyetools 0.6.0

# eyetools 0.5.1

# eyetools 0.5.0
Expand Down
46 changes: 35 additions & 11 deletions R/AOI_seq.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,22 @@
#' @param AOIs A dataframe of areas of interest (AOIs), with one row per AOI (x, y, width_radius, height).
#' @param AOI_names An optional vector of AOI names to replace the default "AOI_1", "AOI_2", etc.
#' @param sample_rate Optional sample rate of the eye-tracker (Hz) for use with raw_data. If not supplied, the sample rate will be estimated from the time column and the number of samples.
#'
#' @return a dataframe containing the sequence of entries into AOIs on each trial
#' @param long Whether to return the AOI fixations in long or wide format. Defaults to long
#' @return a long format dataframe containing the sequence of entries into AOIs on each trial
#' @export
#'
#' @examples
#' fix_d <- fix_dispersion(eyetools::example_raw_WM)
#' AOI_seq(fix_d, eyetools::AOIs_WM)
#'
#' @importFrom dplyr between
#' fix_d <- fixation_dispersion(example_raw_WM)
#' AOI_seq(fix_d, AOIs_WM)
#'
#' @importFrom stats setNames complete.cases
#' @importFrom utils stack

AOI_seq <- function(data,
AOIs,
AOI_names = NULL,
sample_rate = NULL) {
sample_rate = NULL,
long = TRUE) {

# split data by trial
proc_data <- sapply(split(data, data$trial),
Expand All @@ -31,6 +32,29 @@ AOI_seq <- function(data,
data <- data.frame(trial = unique(data$trial),
AOI_entry_seq = proc_data)

if (long == TRUE) {

split_list <- strsplit(data$AOI_entry_seq,';')

split_list_names <- setNames(split_list, data$trial)

data <- stack(split_list_names)

data <- data.frame(trial = as.numeric(data$ind),
AOI = as.numeric(data$value))

# add in entry_n by way of indexing each trial
get_row_n <- function(i) {
store <- data[data$trial == i,]
store$entry_n <- 1:nrow(store)

store
}

data <- do.call(rbind.data.frame, lapply(1:max(data$trial), get_row_n))

}


return(data)

Expand All @@ -47,13 +71,14 @@ AOI_seq_trial_process <- function(trial_data, AOIs, AOI_names) {

if (sum(!is.na(AOIs[a,])) == 4) {
# square AOI
aoi_entries[,a] <- (between(trial_data$x, AOIs[a,1]-AOIs[a,3]/2, AOIs[a,1]+AOIs[a,3]/2) &
between(trial_data$y, AOIs[a,2]-AOIs[a,4]/2, AOIs[a,2]+AOIs[a,4]/2))
} else if (sum(!is.na(AOIs[a,])) == 3) {
aoi_entries[,a] <- ((trial_data$x >= AOIs[a,1]-AOIs[a,3]/2 & trial_data$x <= AOIs[a,1]+AOIs[a,3]/2) &
(trial_data$y >= AOIs[a,2]-AOIs[a,4]/2 & trial_data$y <= AOIs[a,2]+AOIs[a,4]/2))
} else if (sum(!is.na(AOIs[a,])) == 3) {
# circle AOI
aoi_entries[,a] <- sqrt((AOIs[a,1]-trial_data$x)^2+(AOIs[a,2]-trial_data$y)^2) < AOIs[a,3]
} else {
# report error message of bad AOI definition
stop("bad definition of AOI. Cannot identify AOI region")

}
}
Expand All @@ -71,7 +96,6 @@ AOI_seq_trial_process <- function(trial_data, AOIs, AOI_names) {
} else {
aoi_seq <- paste0(aoi_seq, collapse = ";")
}

return(aoi_seq)

}
Expand Down
21 changes: 14 additions & 7 deletions R/AOI_time.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@
#' @export
#'
#' @examples
#' fix_d <- fix_dispersion(eyetools::example_raw_WM)
#' AOI_time(fix_data = fix_d, AOIs = eyetools::AOIs_WM)
#' AOI_time(raw_data = eyetools::example_raw_WM, AOIs = eyetools::AOIs_WM, sample_rate = 120)
#'
#'#' @importFrom dplyr between
#' fix_d <- fixation_dispersion(example_raw_WM)
#' AOI_time(fix_data = fix_d, AOIs = AOIs_WM)
#' AOI_time(raw_data = example_raw_WM, AOIs = AOIs_WM, sample_rate = 120)
#'

AOI_time <- function(fix_data = NULL, raw_data = NULL, AOIs, AOI_names = NULL, sample_rate = NULL) {
Expand Down Expand Up @@ -58,6 +56,15 @@ AOI_time <- function(fix_data = NULL, raw_data = NULL, AOIs, AOI_names = NULL, s
}

colnames(data) <- c("trial", AOI_name_text)

data <- do.call(cbind.data.frame, lapply(1:length(colnames(data)), function(i) {

data[,i] <- as.numeric(data[,i])

}))

colnames(data) <- c("trial", AOI_name_text)

return(data.frame(data))

}
Expand Down Expand Up @@ -107,8 +114,8 @@ AOI_time_trial_process_raw <- function(trial_data, AOIs, sample_rate) {

if (sum(!is.na(AOIs[a,])) == 4) {
# square AOI
xy_hits <- (between(trial_data$x, AOIs[a,1]-AOIs[a,3]/2, AOIs[a,1]+AOIs[a,3]/2) &
between(trial_data$y, AOIs[a,2]-AOIs[a,4]/2, AOIs[a,2]+AOIs[a,4]/2))
xy_hits <- ((trial_data$x >= AOIs[a,1]-AOIs[a,3]/2 & trial_data$x <= AOIs[a,1]+AOIs[a,3]/2) &
(trial_data$y >= AOIs[a,2]-AOIs[a,4]/2 & trial_data$y <= AOIs[a,2]+AOIs[a,4]/2))
} else if (sum(!is.na(AOIs[a,])) == 3) {
# circle AOI
xy_hits <- sqrt((AOIs[a,1]-trial_data$x)^2+(AOIs[a,2]-trial_data$y)^2) < AOIs[a,3]
Expand Down
2 changes: 1 addition & 1 deletion R/combine_eyes.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' @param data raw data with columns time, left_x, left_y, right_x, right_y, and trial
#' @param method either "average" or "best_eye" - see description.
#'
#' @return
#' @return a dataframe of form c("time", "x", "y", "trial")
#' @export
#'
#' @examples combine_eyes(example_raw_binocular, method = "average")
Expand Down
Loading
Loading