Date Fields - Do they need processing for my analysis

Dates and time are always a pain,
look into:

Please use the original dput structure I posted for this following question:

The first column where you see GO-2019770786 is the event_unique_id, although it says unique I see duplicates. I understand that one event can have multiple offences i,e, MCI categories in the dataset and those will not be duplicates. However, I found the duplicate event ids with the same MCI for some records. In this case, how would I drop the duplicates.

I am not sure how to proceed here.

The first two records are duplicates whereas the last two are not.

event_unique_id premisetype ucr_code ucr_ext offence MCI
GO-20141262553 Other 1430 100 Assault Assault
GO-20141262553 Other 1430 100 Assault Assault
GO-20141296470 Commercial 2120 200 B&E Break and Enter
GO-20141296470 Commercial 1480 100 Assault - Resist/ Prevent Seiz Assault

If you want the data set to have a data frame with no duplicated rows, you can use the unique() function. If the data frame is named DF

DF_uniq <- unique(DF)
1 Like

Thank you so much. This works.