metacore
metacore copied to clipboard
spec_to_metacore("Metadata/ADaM_Specifications_TEST.xlsx") incorrectly detect the type by_ds
The input excel file follow the p21 structure with extra sheets and columns. In this case, I think the function, detect DM in the sheet README and consider the type by_ds
Can you please provide an example of the spec you tried to use
Sorry for my late reply, I was on vacation. I was able to generate the issue by adding a sheet ‘README’ in the mock_spec.xlsx file from this package.
And got this message after running spec_to_metacore("Metadata/mock_spec.xlsx")
In my excel file, there are also some sheets with more details for derivation with domain name in it.
Would it be possible to have the possibility to exclude the sheets that should not be read to create the metacore object?
@cpiraux I see the logic in the feature you're asking for, but does this vignette address your questions? It gives you more granular control over tabs and variables that you're referencing for importing to the specific metacore fields.
https://atorus-research.github.io/metacore/articles/Building_Specification_Readers.html
Thanks @mstackhouse! I had a look to the vignette and indeed each function allows to select sheets individually, so there might not be a need to exclude them. I was just thinking it could be useful to avoid the message from spec_to_metacore () saying “Error: This specification format is not currently supported. You will need to write your own reader” when the spec type is not by_DS. There are probably other solutions to avoid this message 😊.
@cpiraux definitely agree it would be easier and a good addition to add the ability to make sheet exclusions. Just wanted to make sure you weren't completely road blocked!