Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing sample columns where width categories is blank #1

Open
roarbra opened this issue Jan 14, 2025 · 5 comments
Open

Missing sample columns where width categories is blank #1

roarbra opened this issue Jan 14, 2025 · 5 comments

Comments

@roarbra
Copy link
Member

roarbra commented Jan 14, 2025

@bennodillingerniva
I've been taken the liberty to do some changes to your script and moved it to this repository. I was hoping to read the Excel files from their source in SharePoint. To do so I Sync this folder. You would also have to change this line.

There is a problem with Excel sheets were the Widths table doesn't have header in all the columns (see linked document). Did you do any trick to avoid these sheets, or do you have a suggestion for reading them?

31A_Solbergstrand_blåskjell_2023.xlsx

@bennodillingerniva
Copy link

bennodillingerniva commented Jan 15, 2025

before I left this task, last thing I discussed with researcher was that it would be good to stick to, and check, the structure of the Excel template.

I also suggested to think about whether it can make sense to develop a better file structure.

@bennodillingerniva
Copy link

in case you are referring to row 18, column C and D in the Excel sheet linked above, then those empty columns should 'go away' in the casting part of the R script (since those will create empty (NA) rows)

@roarbra
Copy link
Member Author

roarbra commented Jan 15, 2025

in case you are referring to row 18, column C and D in the Excel sheet linked above, then those empty columns should 'go away' in the casting part of the R script (since those will create empty (NA) rows)

You spotted the correct line, but the problem is that they 'go away'. In this line x.width will not represent the index of columns, rather it represents index of columns with content.

@bennodillingerniva
Copy link

I looked at this now.

Could it be that we are referring to different tabs in that Excel sheet?

When I realized that researchers didn't stick to the file structure by introducing additional tabs, I went through the files manually changing tab order to have the relevant tab first. This would mean that the script would complete correctly when using my adjusted files, but would fail on other files.

@roarbra
Copy link
Member Author

roarbra commented Jan 17, 2025

I have seen that, but can't see why that is relevant for the problem I'm facing. We might also fix it by looping through all sheets and see which one is relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants