Skip to contents

This function replaces any existing individual identifiers with a new specified identifier across all rows in the dataset. The data is first ungrouped to ensure consistent application of the new identifier.

Usage

set_individual(data, individual)

Arguments

data

A data frame or tibble containing the data to be modified

individual

The new identifier value to be assigned to all rows

Value

A modified data frame with the new individual identifier applied as a factor

Examples

data <- data.frame(time = 1:5, value = rnorm(5))
result <- set_individual(data, "subject_A")