IPS-LMU / emuR

The main R package for the EMU Speech Database Management System (EMU-SDMS)
http://ips-lmu.github.io/EMU.html
23 stars 15 forks source link

Can't duplicate_level() if the level has an attribute defined #250

Open samgregory opened 3 years ago

samgregory commented 3 years ago

I came across an issue today where I wanted to duplicate the bundle level with a transcription attribute (from a database built using convert_txtCollection). The function goes to duplicate the attributes on this level as expected (https://github.com/IPS-LMU/emuR/blob/4e1c44ef6341d7085c648b7812687c8384fe40e2/R/emuR-autoproc_annots.R#L342-L353) but then because the interal_add_attributeDefinition function does a check for that attribute name in the database it will always throw this error: https://github.com/IPS-LMU/emuR/blob/4e1c44ef6341d7085c648b7812687c8384fe40e2/R/emuR-database.DBconfig.R#L480-L482

I want to be able to duplicate the level inclusive of the transcription attribute - can we have a way to rename this attribute when it is duplicated?