This function returns a binary vector indicating where a change occurs in the input numeric, character, or factor vector. The change points are identified based on the direction parameter provided.

get_change_points(data_source, direction = c("front", "back"))

Arguments

data_source

Vector with values (numeric, character, or factor)

direction

Which direction should the values be compared ("front" or "back")

Value

Vector with binary values of length = data_source + 1, where 1 represents a change point and 0 represents no change point.