I have a dataframe with duplicates, and I would like to combine these duplicate pairs in a single line, as follows:
Original dataframe: my_original_dataframe
id. name. age. sex. weigt. date.
01 ANA 18 F 56.7 02/27/2020
02 ANA 18 F 59.5 05/05/2020
03 KARLA 21 F 60.1 08/04/2020
04 KARLA 21 F 60.4 12/30/2020
05 MARIA 30 F 49.9 01/06/2020
06 MARIA 30 F 50.2. 03/07/2020
What would I like to do with R: my_desired_dataframe
id. name age sex weigt1 date1 weight2 date2
01 ANA 18 F 56.7 02/27/2020 59.5 05/05/2020
02 KARLA 21 F 60.1 08/04/2020 60.4 12/30/2020
03 MARIA 30 F 49.9 01/06/2020 50.2 03/07/2020
I will be very grateful for any help!