| All functions | |
|---|---|
| Add angular difference wrt reference direction to movement or eye tracker data frame | |
| Add target fixations to eyetracker data | |
| Add gaze elevation to (head) movement or eye tracker data frame | |
| Add direction of the orientation of a reference object relative to a stationary target (in 2D, XZ). | |
| Add direction of the orientation of a reference object relative to a target movement (in 2D, XZ). | |
| Add rotation matrix to movement or eye tracker data frame | |
| Helper function that takes an eye tracker data frame and adds a new column `R` with the rotation matrices. | |
| Helper function that takes a movement data frame and adds a new column `R` with the rotation matrices. | |
| Add movement speed to movement data frame | |
| This uses R base functions to calculate the angle between two vectors in degrees, accounting for rounding errors to avoid NaNs. | |
| Calculate angle difference in degrees, respecting angles <0 or >360. | |
| Apply replacements using replacement data frame. | |
| Average a list of resampled time series (movement, fruit collection or eyetracking) data frames | |
| Average time series data columns within group | |
| Calculate 2D angle positive z-axis and a line from reference to target position in degrees | |
| Calculate 2D Euclidean distance between two positions | |
| Transform cartesian to spherical coordinates | |
| Check movement data columns | |
| Check whether movement data frame contains valid tracker information | |
| Create output folders under an experiment name | |
| Create resampling index at desired sample rate | |
| Create threat name column from episode name | |
| Automatically detect sounds in audio recording using a volume/duration threshold | |
| Convert rotation in Unity Euler angles (in degrees) into 3D rotation matrix | |
| Extract ratio of target fixation between a `min_time` and `max_time`. You can supply timestamps to `min_time` and `max_time` (e.g timestamp of begin escape) to average over only a period, or use the entire duration of the provided data frame. | |
| Extract fruit picking between a `min_time` and `max_time`. You can supply timestamps to `min_time` and `max_time` (e.g timestamp of begin escape) to average over only a period. In this case, you can also retrieve the collection rate by setting `rate` to 1. | |
| Extract gaze elevation between a `min_time` and `max_time`. | |
| Extract (min, max or) 2D distance between two movement trajectories. | |
| Extract (min, max or mean) 2D distance between movement trajectory and reference position. | |
| Extract direction of the orientation of a reference object relative to a stationary target (in 2D, XZ) between a `min_time` and `max_time`. | |
| Extract direction of the orientation of a reference object relative to a target movement (in 2D, XZ) between a `min_time` and `max_time`. | |
| Extract speed (peak or average speed) between a `min_time` and `max_time`. | |
| Extract angular speed (peak or average speed) for a direction vector between a `min_time` and `max_time`. | |
| Extract duplicated time stamps. | |
| Find fruit position | |
| Find Hierarchy Object | |
| Find Hierarchy Object Matching Any Name | |
| Find initial threat position from programmatic scenario planner | |
| Find messages in a session log and assign to trials | |
| Find safe position | |
| Find Start marker position and rotation | |
| Find Unity's internal threat name | |
| Fit (generalised) linear model, checking for convergence, and obtain marginal means | |
| Fit (generalised) linear random effects model robustly, checking for convergence | |
| Fixes names in older versions of the output. Specifically, deletes the occurance of `"vrthreat_"` in any column names. | |
| Common fruit object names used in VRthreat Unity | |
| Get time of first fruit collection | |
| Get Time Of First Sequence Event | |
| Guess escape abortion position and time | |
| Guess start of escape | |
| Guess end of escape time | |
| Guess First Move From Position | |
| Guess/interpolate position at a point in time | |
| Play audio recording from threat appearance to the end | |
| Play audio section | |
| Plot 3D movements for one trial | |
| Prepare gaze data for further processing | |
| Project 3D-vector x into the plane spanned by y and z | |
| Project vector x onto vector y | |
| Read CSV Files | |
| Read JSON Files | |
| Read log messages | |
| Read participant details from files | |
| Read and score questionnaire data | |
| Read raw (csv) questionnaire data | |
| Read complete study data | |
| Read Trial Results | |
| Remove top-level directory in a full file path. | |
| Remove tutorial trials - i.e. episode either containing "Tutorial" or "Practice" | |
| Reorient movement columns to starting position. | |
| Reorient movement data frame such that initial values match start position and orientation | |
| Replace Redcap id in questionnaires by VR ppid | |
| Resample an eyetracker data frame to new time index. | |
| Resample eyetracker data columns | |
| Resample and median-filter position and rotation columns in a movement data frame | |
| Resample a fruit collection frame to new time index. | |
| Resample fruit task data columns | |
| Resample a movement data frame to new time index. | |
| Resample movement data columns | |
| Compute central angle between two rotation matrices, for a direction vector | |
| Wrapper around `ggsave` to save figures. | |
| Pastel colored ggplot scale | |
| VR Threat End State ggplot scale | |
| VR Threat Planning Time ggplot scale | |
| VR Threat Scenario Type ggplot scale | |
| Manually classify sounds | |
| Split a path name into into its components | |
| Get sum of a questionnaire subscale | |
| Summarise movement data frame for each unique time stamp | |
| Summarise movement data columns to ensure unique time stamps | |
| Get MSSQ subscale score (Motion Sickness; Golding, 2006) | |
| Get sum of a questionnaire if questionnaire exists | |
| VR Threat ggplot theme #' | |
| Compute the mean across a vector `x` respecting time `t`, using trapezium rule. | |
| Translate positions in movement data frame to reference position. | |
| Update file pointers | |
| Find a rotation matrix that maps one vector onto the other | |