diff --git a/R/bidsify.R b/R/bidsify.R index 3e1dc99..8afeb3c 100644 --- a/R/bidsify.R +++ b/R/bidsify.R @@ -45,7 +45,7 @@ #' eyeris::zscore() |> #' eyeris::epoch( #' events = "PROBE_{type}_{trial}", -#' limits = c(-2, 1), # grab 2 seconds prior to and 1 second post event +#' limits = c(-1, 1), # grab 1 second prior to and 1 second post event #' label = "prePostProbe" # custom epoch label name #' ) |> #' eyeris::bidsify( diff --git a/R/epoch.R b/R/epoch.R index 336b276..85c915e 100644 --- a/R/epoch.R +++ b/R/epoch.R @@ -104,21 +104,21 @@ #' limits = c(0, 1) #' ) #' -#' # example 4: 2 seconds prior to and 1 second after probe onset +#' # example 4: 1 second prior to and 1 second after probe onset #' eye_preproc |> #' eyeris::epoch( #' events = "PROBE_START_{trial}", -#' limits = c(-2, 1), +#' limits = c(-1, 1), #' label = "prePostProbe" # custom epoch label name #' ) #' #' # example 5: manual start/end event pairs #' # note: here, the `msg` column of each data frame is optional -#' eye_prepoc |> +#' eye_preproc |> #' eyeris::epoch( #' events = list( -#' data.frame(time = c(11243355), msg = c("TRIALID 0")), # start events -#' data.frame(time = c(11245956), msg = c("RESPONSE_0")) # end events +#' data.frame(time = c(11334491), msg = c("TRIALID 22")), # start events +#' data.frame(time = c(11337158), msg = c("RESPONSE_22")) # end events #' ) #' ) #' @@ -127,8 +127,8 @@ #' eye_preproc |> #' eyeris::epoch( #' events = list( -#' data.frame(time = c(11243355), msg = NA), # start events -#' data.frame(time = c(11245956), msg = NA) # end events +#' data.frame(time = c(11334491), msg = NA), # start events +#' data.frame(time = c(11337158), msg = NA) # end events #' ) #' ) #' @@ -165,11 +165,11 @@ #' ) #' #' # example 9: additional (potentially helpful) example -#' start_events <- data.frame(time = c(11243355, 11247588), -#' msg = c("TRIALID 0", "TRIALID 1")) -#' end_events <- data.frame(time = c(11245956, 11250506), -#' msg = c("RESPONSE_0", "RESPONSE_1")) -#' eye_prepoc |> +#' start_events <- data.frame(time = c(11334491, 11338691), +#' msg = c("TRIALID 22", "TRIALID 23")) +#' end_events <- data.frame(time = c(11337158, 11341292), +#' msg = c("RESPONSE_22", "RESPONSE_23")) +#' eye_preproc |> #' eyeris::epoch(events = list(start_events, end_events)) #' } #' diff --git a/man/bidsify.Rd b/man/bidsify.Rd index 12644a5..ef853fa 100644 --- a/man/bidsify.Rd +++ b/man/bidsify.Rd @@ -79,7 +79,7 @@ system.file("extdata", "memory.asc", package = "eyeris") |> eyeris::zscore() |> eyeris::epoch( events = "PROBE_{type}_{trial}", - limits = c(-2, 1), # grab 2 seconds prior to and 1 second post event + limits = c(-1, 1), # grab 1 second prior to and 1 second post event label = "prePostProbe" # custom epoch label name ) |> eyeris::bidsify( diff --git a/man/epoch.Rd b/man/epoch.Rd index 229effb..c7c5c29 100644 --- a/man/epoch.Rd +++ b/man/epoch.Rd @@ -133,21 +133,21 @@ eye_preproc |> limits = c(0, 1) ) -# example 4: 2 seconds prior to and 1 second after probe onset +# example 4: 1 second prior to and 1 second after probe onset eye_preproc |> eyeris::epoch( events = "PROBE_START_{trial}", - limits = c(-2, 1), + limits = c(-1, 1), label = "prePostProbe" # custom epoch label name ) # example 5: manual start/end event pairs # note: here, the `msg` column of each data frame is optional -eye_prepoc |> +eye_preproc |> eyeris::epoch( events = list( - data.frame(time = c(11243355), msg = c("TRIALID 0")), # start events - data.frame(time = c(11245956), msg = c("RESPONSE_0")) # end events + data.frame(time = c(11334491), msg = c("TRIALID 22")), # start events + data.frame(time = c(11337158), msg = c("RESPONSE_22")) # end events ) ) @@ -156,8 +156,8 @@ eye_prepoc |> eye_preproc |> eyeris::epoch( events = list( - data.frame(time = c(11243355), msg = NA), # start events - data.frame(time = c(11245956), msg = NA) # end events + data.frame(time = c(11334491), msg = NA), # start events + data.frame(time = c(11337158), msg = NA) # end events ) ) @@ -194,11 +194,11 @@ eye_preproc |> ) # example 9: additional (potentially helpful) example -start_events <- data.frame(time = c(11243355, 11247588), - msg = c("TRIALID 0", "TRIALID 1")) -end_events <- data.frame(time = c(11245956, 11250506), - msg = c("RESPONSE_0", "RESPONSE_1")) -eye_prepoc |> +start_events <- data.frame(time = c(11334491, 11338691), + msg = c("TRIALID 22", "TRIALID 23")) +end_events <- data.frame(time = c(11337158, 11341292), + msg = c("RESPONSE_22", "RESPONSE_23")) +eye_preproc |> eyeris::epoch(events = list(start_events, end_events)) }