wadpac / GGIR

Code corresponding to R package GGIR
https://wadpac.github.io/GGIR/
Apache License 2.0
94 stars 60 forks source link

g.inspectfile can't extract sampling rate from header returned by read.myacc.csv() #1056

Closed l-k- closed 7 months ago

l-k- commented 7 months ago

Describe the bug

A user reported an issue here , and I'm able to reproduce it.

For ad-hoc csv files, read.myacc.csv() returns the header arranged in rows, but g.inspectfile() tries to access header rows as if they were columns, like this: header$sample_rate

I will send a PR in a bit.

To Reproduce

To reproduce, I stepped through this test and I tried accessing the sampling rate the same way g.inspectfile() does: D1$header$sample_rate. I saw that the information in D1$header is arranged in rows, and so cannot be addressed like this.

(This issue is not related to any recent changes)

Before submitting