I have two columns (V1 and V2) with character information. I want to create a third column with the "sum" of this characters. Like unique values between comma's "," inside the character vectors on both columns (V1 and V2).
I want to go from this:
Example data:
data.frame(V1 = c('A','A','A','A','B','B','','C'), V2 = c('A, B','A','B','','A, C','A, B','A','')) V1 V2 1 A A, B 2 A A 3 A B 4 A 5 B A, C 6 B A, B 7 A 8 C To this:
V3 1 AB 2 A 3 AB 4 A 5 ABC 6 AB 7 A 8 C
ABCand notBAC?