Skip to content

Commit

Permalink
add unit test for cosinor R2, remove incorrect statement about deprec…
Browse files Browse the repository at this point in the history
…ation in GGIR.Rd, and move NEWS item to new 2.10-5 section #708
  • Loading branch information
vincentvanhees committed Oct 11, 2023
1 parent e419b26 commit 0fb6f92
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# CHANGES IN GGIR VERSION 2.10-5

- Part 2: Move cosinor analysis code to its own function in order to ease re-using it in both part 2 and part 6.

- Part2: Expand cosinor analysis with R2

# CHANGES IN GGIR VERSION 2.10-4

- Part 4: Now better able to handle nights without sustained inactivity bouts (rest) #911

- Part 5: Function g.fragmentation code cleaned up, TP formulas revised following feedback Ian Danilevicz, and code now also produces sleep fragmentation #817

- Part 2: Move cosinor analysis code to its own function in order to ease re-using it in both part 2 and part 6.

- Part2: Expand cosinor analysis with R2

- Part 1: Fixed issue #914 relating to specifying timezone for processing ad-hoc csv format raw data.

- Part 1: Improved recognition of ActiGraph csv that occassionally confused for Axivity csv #918
Expand Down
1 change: 0 additions & 1 deletion man/GGIR.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -1249,7 +1249,6 @@ GGIR(mode = 1:5,
over which L5M5 needs to be calculated. Now this is done with argument qwindow.}
\item{cosinor}{
Argument depricated after version 1.5-24.
Boolean (default = FALSE). Whether to apply the cosinor analysis from the ActCR package.}
}
Expand Down
1 change: 1 addition & 0 deletions tests/testthat/test_cosinor.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ test_that("cosinorAnalyses provides expected output", {
expect_equal(coef60$coefext$params$UpMesor, 19.52358, tolerance = 0.01)
expect_equal(coef60$coefext$params$DownMesor, 16.47642, tolerance = 0.01)
expect_equal(coef60$coefext$params$MESOR, 3.622534, tolerance = 0.01)
expect_equal(coef60$coefext$params$R2, 0.8976208, tolerance = 0.01)

# IV IS
expect_equal(coef60$IVIS$InterdailyStability, 0.9945789, tolerance = 0.01)
Expand Down

0 comments on commit 0fb6f92

Please sign in to comment.