From dc90b7827a0d41a96ed2f45fadb7402db05cc405 Mon Sep 17 00:00:00 2001 From: shawn schwartz Date: Sun, 24 Nov 2024 06:29:51 -0800 Subject: [PATCH 1/6] bug #109: fix start time anchor in `bidsify.R` docs --- R/bidsify.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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( From 94d5acff77bef0d6a875171973554f3d75f2f91d Mon Sep 17 00:00:00 2001 From: shawn schwartz Date: Sun, 24 Nov 2024 06:30:26 -0800 Subject: [PATCH 2/6] bug #109: fix same timing issue in `epoch.R` docs --- R/epoch.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/epoch.R b/R/epoch.R index 336b276..4756e94 100644 --- a/R/epoch.R +++ b/R/epoch.R @@ -104,11 +104,11 @@ #' 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 #' ) #' From c066be80f10651005a89662c5b183b7d7fc5953e Mon Sep 17 00:00:00 2001 From: shawn schwartz Date: Sun, 24 Nov 2024 06:31:12 -0800 Subject: [PATCH 3/6] bug #109: fix similar timing events in manual epoching examples in `epoch.R` docs --- R/epoch.R | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/R/epoch.R b/R/epoch.R index 4756e94..e7e2e57 100644 --- a/R/epoch.R +++ b/R/epoch.R @@ -117,8 +117,8 @@ #' eye_prepoc |> #' 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")) #' eyeris::epoch(events = list(start_events, end_events)) #' } #' From 2fec6484e750d9f2ceedd6ffb196820a34c744f9 Mon Sep 17 00:00:00 2001 From: shawn schwartz Date: Sun, 24 Nov 2024 06:31:35 -0800 Subject: [PATCH 4/6] bug #109: fix typos --- R/epoch.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/epoch.R b/R/epoch.R index e7e2e57..85c915e 100644 --- a/R/epoch.R +++ b/R/epoch.R @@ -114,7 +114,7 @@ #' #' # 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(11334491), msg = c("TRIALID 22")), # start events @@ -165,11 +165,11 @@ #' ) #' #' # example 9: additional (potentially helpful) example -#' 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)) #' } #' From 45b470795c97e5eadab9acc9c5506ac60aa789ea Mon Sep 17 00:00:00 2001 From: shawn schwartz Date: Sun, 24 Nov 2024 06:32:20 -0800 Subject: [PATCH 5/6] bug #109: render new `bidsify()` docs Rd --- man/bidsify.Rd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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( From 1653c297903eb51af747241c79f5975158512420 Mon Sep 17 00:00:00 2001 From: shawn schwartz Date: Sun, 24 Nov 2024 06:32:37 -0800 Subject: [PATCH 6/6] bug #109: render new `epoch()` docs Rd --- man/epoch.Rd | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) 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)) }