Open peterdesmet opened 2 years ago
Thanks for reporting. @amoeba may be able to shed more light here, but my shot-in-the-dark is that it's related to the fact that we parse the ORCID identifier as the id
to the block (I think when you re-use an element in EML you really want to use a reference
and not repeat the element like we do in the example; but it's only really an issue when the element has an id)
e.g. can you try the above but without a comment
element on the person the used in the contact field? (I could be entirely wrong here too)
Hmm, yes, if I try:
me <- person("Peter", "Desmet", , "fakeaddress@email.com", "mdc")
my_eml <- list(dataset = list(
title = "A Minimal Valid EML Dataset",
creator = as_emld(me),
contact = as_emld(me)
))
write_eml(my_eml, "ex.xml")
It doesn't get duplicated.
Too bad, it was pretty useful that I could use as_emld()
on person. I guess I'll have to parse those out and feed them to set_responsibleParty()
where I specifically assign each property?
The Creating EML vignette suggests using
as_emld(R_person)
to efficiently code a person as an EML party.Created on 2022-04-29 by the reprex package (v2.0.1)
That generated EML does indeed contain that info nicely. However, the written EML contains the individualName twice:
Any idea why this is happening? Note, it is not happening when:
creator
orcontact
is set (rather than both)