basic-use.Rmd
Navr object can be filtered by time with filter_times
function. The function takes either real time as is in the $timestamp
column or can take time_since_start
times if zero_based = TRUE
. For that your object needs to be preprocessed with either add_time_since_start
, add_time_columns
or add_columns_navr
. See loading and preprocessing vignette.
So if you say for example only the first 10 seconds of your obj, you can do the following
If you on the other hand want to filter as per real timestamps, you can simply do so with
head(obj_prep$data[,1:5])
#> timestamp rotation_x rotation_y fps input
#> 1 58204.13 0 0 Inf EyeTrackerSynchro
#> 2 58204.19 0 0 Inf
#> 3 58204.19 0 0 Inf
#> 4 58204.24 0 0 126.4711
#> 5 58204.57 0 0 78.4690
#> 6 58204.68 0 0 22.7818
obj_filtered <- filter_times(obj_prep, c(58250,58255))
head(obj_filtered$data[,1:5])
#> timestamp rotation_x rotation_y fps input
#> 1111 58250.02 356.3000 3.6001 18.5315
#> 1112 58250.07 350.7000 3.8001 18.1309
#> 1113 58250.12 347.9001 3.8001 18.1133
#> 1114 58250.18 343.7000 3.9001 18.2432
#> 1115 58250.23 342.8000 4.0001 18.3267
#> 1116 58250.28 341.4001 3.9001 18.4166