I am dealing with a very similar situation as described at:
I have an sf object with duplicate field names (in a case-insensitive way). Coercing to sp with
as(foo, "Spatial") does not do any sanitizing and this breaks downstream processing.
The errors I get are variously:
ERROR: Cannot insert new row: insert into
foovalues ( 1, 55800, )
Failed to create feature
Is there an automated solution other than manually checking for dups and renaming?