library(pupilr) #> Loading required package: ggplot2 eye <- load_folder("../tests/test-data") names(eye) #> [1] "data" "info" "export_info" "surfaces" class(eye) #> [1] "list" "pupilr"
head(eye$data$gaze[, 1:6]) #> world_timestamp world_index confidence norm_pos_x norm_pos_y base_data #> 1 24406.30 0 0.99927369 0.7003364 0.5036496 24406.304517-1 #> 2 24406.31 0 0.12328624 0.7900259 0.4473870 24406.307113-0 #> 3 24406.31 0 0.99733253 0.6999799 0.5067002 24406.312586-1 #> 4 24406.32 0 0.07647939 0.8052472 0.4457641 24406.315182-0 #> 5 24406.32 0 0.99929332 0.6997234 0.5056053 24406.320655-1 #> 6 24406.32 0 0.20140568 0.8038345 0.4528181 24406.323251-0
Surfaces can be extracted from the entire object, or loaded on their own
sf <- eye$surfaces sf <- open_surfaces("../tests/test-data") names(sf$items) #> [1] "unnamed"
head(sf$data$events) #> frame_number timestamp surface_name surface_uid event_type #> 1 0 24406.30 unnamed 1552524777 enter #> 2 137 24414.51 unnamed 1552524777 exit #> 3 145 24414.81 unnamed 1552524777 enter #> 4 150 24415.18 unnamed 1552524777 exit #> 5 158 24415.52 unnamed 1552524777 enter #> 6 271 24421.75 unnamed 1552524777 exit