wadpac / GGIR

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

Suggestions for pr 1073 #1077

Closed l-k- closed 6 months ago

l-k- commented 6 months ago

Additional suggestions for #1073.

  1. read.myacc.csv() reads sf value from the header and only uses sf = rmc.sf if there was no valid value provided in the header. This sf value is returned by read.myacc.csv(), to be used elsewhere in GGIR. But the rest of read.myacc.csv() itself was using rmc.sf throughout the module, whether or not sf was indeed equal to rmc.sf. After this PR, sf will be used throughout read.myacc.csv()

  2. There are two more places in the code where we are dividing 1/sf, so we now make sure that sf != 0 before we attempt division.

  3. Only check for time gaps if the timestamp column is supplied.

  4. For time gap imputation, we estimate sf if no value is provided. This estimated value isn't returned by read.myacc.csv and isn't used anywhere else. So we probably shouldn't use it for resampling either, because otherwise the resampling process is inconsistent and depends on whether or not we did time gap imputation.