The set_content_units function is appears to have a bug when you set force=FALSE and NPS=False. I was wanting to manually with in R add a non-nps geographicCoverage in the XML. When selecting option 2 - Add to the existing unit Connections, it replicates the existing units.
##Code below is what I was using:
park_units <- c("ROMO", "GRSA", "YELL")
in_eml2 <- set_content_units(in_eml, park_units, force=FALSE, NPS=FALSE)
Your metadata already has the following Content Unit Links Specified:
NPS Content Unit Link: ROMO
NPS Content Unit Link: GRSA
NPS Content Unit Link: YELL
Do you want to
1: Retain the existing Unit Connections
2: Add to the exsiting Unit Connections
3: Replace the existing Unit Connections2
#After selectin 2:
Your metadata now has the following Content Unit Links Specified:
NPS Content Unit Link: ROMO
NPS Content Unit Link: GRSA
NPS Content Unit Link: YELL
NPS Content Unit Link: ROMO
NPS Content Unit Link: GRSA
NPS Content Unit Link: YELL
#The get_content_units() function also appears to not be working. This is what I get after select 2 above:
get_content_units(in_eml)
[1] "NPS Content Unit Links: "
Warning message:
In get_content_units(in_eml) :
No Park Unit Connections specified. Use the set_content_units() function to add Park Unit Connections.