R - tidyr - mutate and spread multiple columns
问题 I have the following dataframe in R my_df_test <- data.frame(V1 = c(1,2,1), V2 = c("A","B","A"), V3 = c("S1", "S1", "S2"), V4 = c("x","x","x"), V5 = c("y","y","y"), V6 = c("A", "B", "C"), V7 = c("D","E","F")) my_df_test V1 V2 V3 V4 V5 V6 V7 1 1 A S1 x y A D 2 2 B S1 x y B E 3 1 A S2 x y C F Now I want to check if the combination of values in V1 and V2, occurs multiple times in the df. In my example my_df lines 1 and 3 have the same values '1 A' and '1 A'. If this happens, I want the following