Nothing
#' Change Group ID
#'
#' @description Change the group ID to be consequetive numbers, starting at 1, which is
#' required for model fitting.
#'
#' @param group Numeric Vector. The grouping variable (e.g., subjects).
#'
#' @return Updated group ID.
#'
#' @examples
#' # congruent trials
#' dat <- subset(flanker, id %in% c(39, 23, 2))
#' change_group(dat$id)
#' @export
change_group <- function(group){
x <- rle(group)$lengths
new_id <- rep(x = seq_along(x),
times = x)
return(new_id)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.