% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ibi-helpers.R
\name{summarise_gazepoint_ibi_windows}
\alias{summarise_gazepoint_ibi_windows}
\title{Summarise IBI/RR windows}
\usage{
summarise_gazepoint_ibi_windows(
  data,
  ibi_col = NULL,
  group_cols = NULL,
  time_col = NULL,
  unit = c("auto", "milliseconds", "seconds"),
  min_ibi_ms = 300,
  max_ibi_ms = 2000,
  max_jump_ms = 500,
  exclude_large_jumps = TRUE,
  min_valid_ibi = 2L
)
}
\arguments{
\item{data}{A data frame.}

\item{ibi_col}{Optional IBI/RR interval column. If \code{NULL}, the function
detects recognised IBI/RR-style column names.}

\item{group_cols}{Optional grouping columns defining windows, such as
participant, trial, stimulus, condition, or window labels.}

\item{time_col}{Optional time/order column used to order IBI values before
successive-difference metrics are computed.}

\item{unit}{Unit of the IBI values. \code{"auto"} treats median values below 10 as
seconds and larger values as milliseconds.}

\item{min_ibi_ms}{Minimum plausible IBI in milliseconds.}

\item{max_ibi_ms}{Maximum plausible IBI in milliseconds.}

\item{max_jump_ms}{Maximum plausible absolute change between successive IBI
values within a group.}

\item{exclude_large_jumps}{Logical. Should intervals flagged as large jumps be
excluded from the window summaries?}

\item{min_valid_ibi}{Minimum valid IBI count required for a window to be marked
as sufficient.}
}
\value{
A list with \code{overview}, \code{windows}, \code{samples}, and \code{settings}.
}
\description{
Computes descriptive IBI/RR interval and simple HRV-style window summaries
from genuine inter-beat interval data. The function does not use raw \code{HRV}
columns as HRV metrics. It calculates metrics such as mean IBI, mean
instantaneous heart rate, SDNN, RMSSD, pNN20, and pNN50 only from valid IBI/RR
intervals.
}
\examples{
df <- data.frame(
  USER = rep(c("P1", "P2"), each = 4),
  IBI = c(800, 810, 790, 805, 900, 910, 905, 920)
)
summarise_gazepoint_ibi_windows(df, group_cols = "USER")

}
