Conversation
…teing as metadata_1
…ill use the section_headers index location created earlier from metadata and subset metadata based on those index locations then it will populate based on the seq_along(metadata_1) which is now the correct length as it has the section headers removed. This means that the number of section headers for each section matches the number of variables in each section
vdat_inspect() patch vr2ar vrl
vdat_inspect() patch vr2ar vrlvdat_inspect() patch-vr2ar vrl
vdat_inspect() patch-vr2ar vrlvdat_inspect() patch-vr2ar-vrl
|
Thanks for taking a stab at this! The section headers were misaligned in the final output as the headers were identified based on the full metadata, but then I also noticed that in some other files, subheaders are designated by dashes (see below). I'm going to merge this now to make it work for some files and open a separate issue to address that. |
|
Thanks! I wasn't sure exactly how you'd want this solved but makes sense that they were misaligned considering I was trying to fix this using two different length objects. Having the indicies be pulled out right away makes a lot of sense and saved as their own object. Then just applying that to the original metadata with removing section headers at the very end of that call makes sense to me. Yea I noticed that as well but wasn't sure how you wanted to handle that. I can take a look at it that issue more in depth. In the mean time I'm going to delete this branch. |
|
Cross reference to above comment: #24 |
This fixes #18 by changing the order of sequences. Below is the new order of opperations.
section_headersis created as the index location of each header inmetadatametadatathen has these section headers removed and this object is now calledmetadata_1- if you don't like this name we can change this easily. I know you were hoping to probably not create more than a few objects in this but I'm unsure how to to do this without creating a new object and referring back to the original.section_headersare then created based on their index location frommetadataat the length ofmetadata_1usingseq_along().metadatatometadata_1so it returns the proper object.This clears tests for
vdat_inspect()while there are other tests for other functions that do not clear but I am sure you're aware of those. Thank you for implementingwine. I can write up a workflow/vignette if you'd like on it and create another PR.