-
Notifications
You must be signed in to change notification settings - Fork 62
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
Facilitate research on comparing self-reported nap/nonwear with acc-based daytime rest detection #900
Conversation
…sibreport anlayses inside g.part5 for initial testing, next step is to move this to separate functions and add unit-tests #687
… nap, more overlap variables added to output, sibreport items changed
…lable #687 and minor typo fix
if (length(longboutsi) > 0) { | ||
sibreport = sibreport[longboutsi,] | ||
srep_tmp = sibreport[which(sibreport$start > min(time) & | ||
sibreport$end < max(time)),] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not getting the expected output when testing this, and it is because time here is introduced as ISO6801, but sibreport$start
and sibreport$end
are stored as POSIX objects, so the function was not able to find any srep_tmp
.
I fixed this locally by introducing these lines at the begining of this function:
# transform time to POSIX
if (is.ISO8601(time[1])) {
time = iso8601chartime2POSIX(time, tz = tz)
}
@vincentvanhees Should I commit this change or do you want to investigate why do you get the expected output and I don't?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, please. I have been working so far with the csv variant of ms5.outraw. Maybe if you use the RData variant time is also stored different. It is good to facilitate both.
…when testing if it is ISO8601
Looks like the problem is that |
Great, I have already merged the changes from the master branch, I will not do any more commits. |
…/GGIR into issue687_nap_enhancement2
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@
## master #900 +/- ##
==========================================
+ Coverage 78.01% 78.23% +0.21%
==========================================
Files 91 92 +1
Lines 12138 12302 +164
==========================================
+ Hits 9469 9624 +155
- Misses 2669 2678 +9
|
This PR expands part 5 to help us get a better understanding of the meaning of daytime SIBs compared with self-reported naps and self-reported nonwear by looking at their overlap.
possible_nap_edge_acc
to specify the maximum acceleration value to consider before and/or after the sustained inactivity bout (default = Inf).If the user finds an optimal setting for these arguments then that could possibly inform a new nap classification algorithm.
Note: The nap detection itself is still limited to the model trained in 3-year olds and I am not changing anything to that. This functionality should be able to run without using the current nap detection option.
Fixes #687
Checklist before merging:
inst/NEWS.Rd
with a user-readable summary. Please, include references to relevant issues or PR discussions.DESCRIPTION
andCITATION.cff
files.