Skip to content

Commit

Permalink
part6_threshold_combi now uses first value of lig, mod and vig thresh…
Browse files Browse the repository at this point in the history
…olds if not specified
  • Loading branch information
vincentvanhees committed Oct 15, 2024
1 parent 9a968c2 commit 2e3e8ae
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions R/check_params.R
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,9 @@ check_params = function(params_sleep = c(), params_metrics = c(),
params_phyact[["mvpadur"]] = c(1,5,10)
warning("\nmvpadur needs to be a vector with length three, value now reset to default c(1, 5, 10)", call. = FALSE)
}
if (length(params_phyact[["threshold.lig"]]) == 1 &&
if ((length(params_phyact[["threshold.lig"]]) == 1 &&
length(params_phyact[["threshold.mod"]]) == 1 &&
length(params_phyact[["threshold.vig"]]) == 1) {
length(params_phyact[["threshold.vig"]]) == 1) | is.null(params_phyact[["part6_threshold_combi"]])) {
params_phyact[["part6_threshold_combi"]] = paste(params_phyact[["threshold.lig"]],
params_phyact[["threshold.mod"]],
params_phyact[["threshold.vig"]], sep = "_")
Expand Down
5 changes: 2 additions & 3 deletions R/g.plot5.R
Original file line number Diff line number Diff line change
Expand Up @@ -902,9 +902,8 @@ g.plot5 = function(metadatadir = c(), dofirstpage = FALSE, viewingwindow = 1,
((daycount - 1) / NGPP) == (round((daycount - 1) / NGPP))) {
mtext(paste0("Filename: ", fnames_ms1_stripped[sel]),
side = 3, line = 0, outer = TRUE, font = 2, cex = 0.6)
mtext(text = paste0("Warning: This GGIR report will be deprecated,",
" please start using the new ",
"visualreport as now stored in the same folder."),
mtext(text = paste0("Warning: This GGIR report is not intended to be used for data quality assessment and is a legacy of a quick attempt in 2015 to have something to show to a study participant,",
" To visually quality check your data see file names starting with Time_report_ "),
side = 3, line = 1, outer = TRUE, font = 2, cex = 0.7
)
}
Expand Down
2 changes: 1 addition & 1 deletion R/load_params.R
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ load_params = function(topic = c("sleep", "metrics", "rawdata",
threshold.mod = 100, threshold.vig = 400,
boutdur.mvpa = c(1,5,10), boutdur.in = c(10,20,30),
boutdur.lig = c(1,5,10), frag.metrics = c(),
part6_threshold_combi = "40_100_400")
part6_threshold_combi = NULL)
}
if ("cleaning" %in% topic) {
params_cleaning = list(includedaycrit = 16, ndayswindow = 7,
Expand Down
6 changes: 4 additions & 2 deletions man/GGIR.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -1067,8 +1067,10 @@ GGIR(mode = 1:5,
See package vignette for description of fragmentation metrics.}
\item{part6_threshold_combi}{
Character (default = "40_100_120") to indicate the threshold combination derived in
part 5 to be used for part 6
Character (default = NULL) to indicate the threshold combination derived in
part 5 to be used for part 6. For example, "40_100_120". If left in default value
GGIR will use the first threshold value from parameters \code{threshold.lig},
\code{threshold.mod}, and \code{threshold.vig}.
}
}
}
Expand Down

0 comments on commit 2e3e8ae

Please sign in to comment.