Hi All, I have a dataset with four columns, of which the middle two have character variables from which I would like to delete duplicates. The first column is an identifier column, 'GuestNo'. The second and third columns are character columns listing type of candy bought before and after a diet program. The second column is the type of candy a guest bought before a diet program, the third column is the type of candy a guest bought after a diet program. I only want to keep the rows which show the unique candy choices before and after the diet program. My data currently looks like this: GuestNo Before After Cost 1 A 3 1 A 3.5 1 A 3 1 B 4 1 C 5 1 A 3.75 1 A 3.75 1 B 4.5 1 D 7 1 E 8 2 A 3.25 2 F 9.25 2 F 9.50 2 G 10 I want to know the amount of money guests spend on unique types of candy before and after the program. Thus, I would like to be able to create a new dataset that looks like this: GuestNo Before After Cost 1 C 5 1 D 7 1 E 8 2 A 3.25 2 G 10 I have tried using a 'nodupkey' function, but it seems to only delete data from one column at a time, without the ability to read from multiple columns. Any help would be much apprecaited on the topic!
... View more