Skip to content

Commit

Permalink
Merge pull request #957 from wadpac/issue952_appendingChunksGt3x
Browse files Browse the repository at this point in the history
Issue952 appending chunks gt3x
  • Loading branch information
jhmigueles authored Oct 30, 2023
2 parents 5e498f1 + 0ab2e75 commit 88bdbc3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ Authors@R: c(person("Vincent T","van Hees",role=c("aut","cre"),
person(given = "Taren",family = "Sanders", role = "ctb"),
person("Medical Research Council UK", role = c("cph", "fnd")),
person("Accelting", role = c("cph", "fnd")),
person("French National Research Agency", role = c("cph", "fnd")))
person("French National Research Agency", role = c("cph", "fnd")),
person("Chenxuan","Zhao",role="ctb"))
Maintainer: Vincent T van Hees <[email protected]>
Description: A tool to process and analyse data collected with wearable raw acceleration sensors as described in Migueles and colleagues (JMPB 2019), and van Hees and colleagues (JApplPhysiol 2014; PLoSONE 2015). The package has been developed and tested for binary data from 'GENEActiv' <https://activinsights.com/> and GENEA devices (not for sale), .csv-export data from 'Actigraph' <https://theactigraph.com> devices, and .cwa and .wav-format data from 'Axivity' <https://axivity.com>. These devices are currently widely used in research on human daily physical activity. Further, the package can handle accelerometer data file from any other sensor brand providing that the data is stored in csv format and has either no header or a two column header. Also the package allows for external function embedding.
URL: https://github.com/wadpac/GGIR/, https://groups.google.com/forum/#!forum/RpackageGGIR, https://wadpac.github.io/GGIR/
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# CHANGES IN GGIR VERSION 3.0-1

- Part 2: Bug fix in csv report generation when appending part 2 milestone data with differing number of columns #951

# CHANGES IN GGIR VERSION 3.0-0

- Part 1 and 2: Change default value for nonwear_approach to "2023" which labels the entire window as nonwear if conditions are met. This instead of only the middle 15 minutes as is the case for "2013" setting. Further, setting "2023" now uses a 5 Hertz version of the signals for non-wear detection, for clipping detection the code uses the original signal.
Expand Down
4 changes: 2 additions & 2 deletions R/g.readaccfile.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ g.readaccfile = function(filename, blocksize, blocknumber, filequality,
# endpage and the blocksize.
if (blocknumber != 1 & length(PreviousEndPage) != 0) {
# if ((mon == MONITOR$GENEACTIV && dformat == FORMAT$BIN) || dformat == FORMAT$CSV) { # change this line as the csv data do not need to skip one more row (the skip argument in read.csv does not include this row of the dataset)
if (mon == MONITOR$GENEACTIV && dformat == FORMAT$BIN) {
# only in GENEActiv binary data and for csv format data
if ((mon == MONITOR$GENEACTIV && dformat == FORMAT$BIN) | dformat == FORMAT$GT3X) {
# only in GENEActiv binary data and for gt3x format data
# page selection is defined from start to end (including end)
startpage = PreviousEndPage + 1
} else {
Expand Down
2 changes: 1 addition & 1 deletion R/g.report.part2.R
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ g.report.part2 = function(metadatadir = c(), f0 = c(), f1 = c(), maxdur = 0,
QC = QC[, colnames(QCout)] # reorder to match order of QCout
} else if (n1 < n2) {
newcolnames = colnames(QC)[which(colnames(QC) %in% colnames(QCout) == FALSE)]
newcols = (n2 + 1):(n1 + length(newcolnames))
newcols = (n1 + 1):(n1 + length(newcolnames))
QCout = cbind(QCout, matrix(" ", 1, n2 - n1))
colnames(QCout)[newcols] = newcolnames
QCout = QCout[, colnames(QC)] # reorder to match order of QC
Expand Down

0 comments on commit 88bdbc3

Please sign in to comment.