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

Documentation fixes #988

Merged
merged 11 commits into from
Dec 13, 2023
6 changes: 3 additions & 3 deletions .github/workflows/r_codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ jobs:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

patch: off
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: covr, any::rcmdcheck, any::XML
extra-packages: covr

- name: Test coverage
run: covr::codecov()
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

- Part 1: Now also able to handle some more variations in Actigraph csv count file format #978, and automatically aggregates to lower resolution if short epoch size is longer than observed epoch size in actigraph count csv.

- Part 5: Reverting decision to prohibit segmentDAYSPTcrit.part5 to be c(0, 0). The default remains unchanged and documentation now only emphasizes the downside of using c(0, 0). #980

- Argument documentation: Fixing series of typos (thanks to Pieter-Jan Marent for pointing them out)

- Part 5: Fix bug in recently added fucntionality for studying overlap between sibs and self-reported beahviours #989.

# CHANGES IN GGIR VERSION 3.0-1
Expand Down
21 changes: 8 additions & 13 deletions R/check_params.R
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ check_params = function(params_sleep = c(), params_metrics = c(),
numeric_params = c("qlevels", "ilevels", "IVIS_windowsize_minutes", "IVIS_epochsize_seconds",
"IVIS.activity.metric", "IVIS_acc_threshold",
"qM5L5", "MX.ig.min.dur", "M5L5res", "winhr", "LUXthresholds", "LUX_cal_constant",
"LUX_cal_exponent", "LUX_day_segments", "window.summary.size", "L5M5window")
"LUX_cal_exponent", "LUX_day_segments", "L5M5window")
boolean_params = c("cosinor", "part6CR", "part6HCA")
character_params = c("qwindow_dateformat", "part6Window")
check_class("247", params = params_247, parnames = numeric_params, parclass = "numeric")
Expand Down Expand Up @@ -433,23 +433,18 @@ check_params = function(params_sleep = c(), params_metrics = c(),
", the default value has been assigned (i.e., 0.5) "), call. = FALSE)
} else if (params_cleaning[["segmentWEARcrit.part5"]] < 0 |
params_cleaning[["segmentWEARcrit.part5"]] > 1) {
stop(paste0("Incorrect value of segmentWEARcrit.part5, this should be a",
"fraction of the day between zero and one, please change."),
stop(paste0("Incorrect value of segmentWEARcrit.part5, this should be a ",
"fraction between zero and one, please change."),
call. = FALSE)
}
if (length(params_cleaning[["segmentDAYSPTcrit.part5"]]) != 2) {
stop("\nArgument segmentDAYSPTcrit.part5 is expected to be a numeric vector of length 2", call. = FALSE)
}
if (sum(params_cleaning[["segmentDAYSPTcrit.part5"]]) < 0.5 |
0 %in% params_cleaning[["segmentDAYSPTcrit.part5"]] == FALSE) {

stop(paste0("\nIf you used argument segmentDAYSPTcrit.part5 then make sure",
" it includes one zero",
" and one value of at least 0.5, see documentation for",
" argument segmentDAYSPTcrit.part5. If you do not use",
" argument segmentDAYSPTcrit.part5",
" then delete it from your config.csv file (in your output folder)",
" or delete the config.csv file itself."), call. = FALSE)
if (any(params_cleaning[["segmentDAYSPTcrit.part5"]] < 0) |
any(params_cleaning[["segmentDAYSPTcrit.part5"]] > 1)) {
stop(paste0("Incorrect values of segmentDAYSPTcrit.part5, these should be a ",
"fractions between zero and one, please change."),
call. = FALSE)
}
}

Expand Down
2 changes: 1 addition & 1 deletion R/createConfigFile.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ createConfigFile = function(config.parameters = c(), GGIRversion = "") {
"includedaycrit", "M5L5res", "winhr", "qwindow", "qlevels",
"ilevels", "mvpathreshold", "boutcriter", "ndayswindow",
"do.imp", "epochvalues2csv", "mvpadur",
"window.summary.size", "dayborder", "closedbout",
"dayborder", "closedbout",
"IVIS_windowsize_minutes", "IVIS_epochsize_seconds", "iglevels",
"IVIS.activity.metric", "TimeSegments2ZeroFile", "qM5L5", "do.part3.pdf") == TRUE) {
out[i,3] = "Study design, Parameters descriptive analysis"
Expand Down
2 changes: 1 addition & 1 deletion R/load_params.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ load_params = function(topic = c("sleep", "metrics", "rawdata",
MX.ig.min.dur = 10, M5L5res = 10, winhr = 5, iglevels = c(),
LUXthresholds = c(0, 100, 500, 1000, 3000, 5000, 10000),
LUX_cal_constant = c(), LUX_cal_exponent = c(), LUX_day_segments = c(),
window.summary.size = 10, L5M5window = c(0, 24), cosinor = FALSE,
L5M5window = c(0, 24), cosinor = FALSE,
part6CR = FALSE, part6HCA = FALSE,
part6Window = c("start", "end"))
}
Expand Down
Loading