knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(pupilr)
eye <- load_folder("../tests/test-data")
names(eye)
class(eye)
head(eye$data$gaze[, 1:6])

Surfaces

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)
head(sf$data$events)

Conversion

The conversion to eyer data format adds a class and does some transformations to the structure of the list and each data.frame with eye data, which is expected from the eyer package. Some information may be lost in the process.

eyer_eye <- as.eyer(eye)

class(eyer_eye)
# all surfaces are converted as well
class(eyer_eye$surfaces$items$unnamed)

# Or you can convert a single surface 
eyer_surface <- as.eyer(sf$items$unnamed)


hejtmy/pupilr documentation built on April 23, 2021, 11:53 a.m.