forked from irinagain/iglu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
25 additions
and
26 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,25 @@ | ||
# # Test on one subject data | ||
# test_hall = example_data_hall[example_data_hall$id == '2133-010', ] | ||
# test_meals = example_meals_hall[example_meals_hall$id == '2133-010', ] | ||
# out = meal_metrics(test_hall, test_meals, interpolate = TRUE, adjust_mealtimes = TRUE) | ||
# | ||
# | ||
# # delta G | ||
# test_that("no changes on Hall 2133-010 for delta G", { | ||
# expect_equal(out$deltag[1], 42.1, tolerance = 0.2) | ||
# expect_equal(out$deltag[2], 25.0, tolerance = 0.2) | ||
# expect_equal(out$deltag[3], 37.2, tolerance = 0.2) | ||
# }) | ||
# | ||
# # delta T | ||
# test_that("no changes on Hall 2133-010 for delta T", { | ||
# expect_equal(out$deltat[1], 60, tolerance = 0.2) | ||
# expect_equal(out$deltat[2], 45, tolerance = 0.2) | ||
# expect_equal(out$deltat[3], 155, tolerance = 0.2) | ||
# }) | ||
# | ||
# # delta G | ||
# test_that("no changes on Hall 2133-010 for baseline recovery", { | ||
# expect_equal(out$basereco[1], 0.741, tolerance = 0.2) | ||
# expect_equal(out$basereco[2], 1.88, tolerance = 0.2) | ||
# expect_equal(out$basereco[3], 0.918, tolerance = 0.2) | ||
# }) | ||
# Test on one subject data | ||
test_hall = example_data_hall[example_data_hall$id == '2133-018', ] | ||
test_meals = example_meals_hall[example_meals_hall$id == '2133-018', ] | ||
out = meal_metrics(test_hall, test_meals, interpolate = TRUE, adjust_mealtimes = TRUE) | ||
|
||
# delta G | ||
test_that("no changes on Hall 2133-018 for delta G", { | ||
expect_equal(out$deltag[1], 97.8, tolerance = 0.2) | ||
expect_equal(out$deltag[2], 171, tolerance = 0.2) | ||
expect_equal(out$deltag[3], 77.6, tolerance = 0.2) | ||
}) | ||
|
||
# delta T | ||
test_that("no changes on Hall 2133-018 for delta T", { | ||
expect_equal(out$deltat[1], 80, tolerance = 0.2) | ||
expect_equal(out$deltat[2], 75, tolerance = 0.2) | ||
expect_equal(out$deltat[3], 75, tolerance = 0.2) | ||
}) | ||
|
||
# delta G | ||
test_that("no changes on Hall 2133-018 for baseline recovery", { | ||
expect_equal(out$basereco[1], 0.378, tolerance = 0.2) | ||
expect_equal(out$basereco[2], 0.429, tolerance = 0.2) | ||
expect_equal(out$basereco[3], 0.670, tolerance = 0.2) | ||
}) |