Remove adjacent repeats in a dataframe

diagonalize(df, var_char)

Arguments

df

a data frame

var_char

the column to be diagonalized

Value

data frame