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

set daysleep_offset default value #399

Merged
merged 9 commits into from
Feb 26, 2021
Merged

set daysleep_offset default value #399

merged 9 commits into from
Feb 26, 2021

Conversation

l-k-
Copy link
Collaborator

@l-k- l-k- commented Feb 18, 2021

Default value of daysleep_offset was missing for single-midnight scenarios.

This pull request will address #398

l-k- added 3 commits February 17, 2021 21:55
Default value of daysleep_offset was missing for single-midnight scenarios.
…nd 5

Errors and warnings collected during execution of parts 1,2,3 and 5 were only printed out when do.parallel=TRUE, and were unreported otherwise.
@codecov-io
Copy link

codecov-io commented Feb 26, 2021

Codecov Report

Merging #399 (83081a4) into master (d0af9d0) will increase coverage by 1.24%.
The diff coverage is 54.16%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #399      +/-   ##
==========================================
+ Coverage   73.30%   74.55%   +1.24%     
==========================================
  Files          77       80       +3     
  Lines        9584     9624      +40     
==========================================
+ Hits         7026     7175     +149     
+ Misses       2558     2449     -109     
Impacted Files Coverage Δ
R/g.part2.R 65.98% <40.00%> (+1.36%) ⬆️
R/g.part3.R 75.86% <40.00%> (+2.29%) ⬆️
R/g.part5.R 80.99% <40.00%> (+0.38%) ⬆️
R/g.part1.R 70.86% <50.00%> (+1.63%) ⬆️
R/g.IVIS.R 94.59% <100.00%> (+5.40%) ⬆️
R/g.shell.GGIR.R 87.61% <100.00%> (+12.38%) ⬆️
R/g.sib.det.R 74.43% <100.00%> (+11.79%) ⬆️
src/resample.cpp 100.00% <0.00%> (ø)
src/init.c 100.00% <0.00%> (ø)
src/numUnpack.cpp 100.00% <0.00%> (ø)
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d0af9d0...83081a4. Read the comment docs.

Copy link
Member

@vincentvanhees vincentvanhees left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Lena, this looks great and also runs without errors on my test files.
Do you want to add your name to the contributor list in the DESCRIPTION file?

Note that my criteria for being listed as a contributor are low: Anyone who has spent a bit of time trying to understand and improve the code is listed.

l-k- added 6 commits February 26, 2021 09:56
c() is equivalent to NULL, which is causing problems in the following line in `g.analyse.perfile.R`:

filesummary[vi:(vi+3)] = c(InterdailyStability, IntradailyVariability,
                               IVIS_windowsize_minutes, IVIS_epochsize_seconds)

The thing is, NULL is not allowed in a vector, and so it's getting ignored, and we end up with a vector size of 3 instead of 4. This causes a warning when Part2 is run:

"number of items to replace is not a multiple of replacement length"

NA doesn't have this problem and can be used to represent a missing value.
otherwise on the next line we get an error because

if (NA == 'c()')

is actually undefined.
The fact that the two statements are on the same line doesn't automatically group them into one block; only curly braces can that.

Otherwise `do.anglez = TRUE` is always executed, for all values of `mode`.
@l-k-
Copy link
Collaborator Author

l-k- commented Feb 26, 2021

Vincent -- I just added my name to the contributor list.

If the changes look good to you, I think this is done for now.

I would still like to re-write g.sib.det.R to get rid of the redundant code and to make sure daysleep_offset is used correctly in one-night scenario. But I'd rather do that in a separate PR and not let this PR get too big. It's a bigger change and will need its own testing.

@vincentvanhees
Copy link
Member

Sounds good, I will now merge this PR to the Master branch.

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

Successfully merging this pull request may close these issues.

3 participants