Skip to content

Commit 365ccc9

Browse files
committed
fix bug when assigning colnames to data after imputing missing data
1 parent d0a1528 commit 365ccc9

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

R/ReadAndCalibrate.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ ReadAndCalibrate = function(file, sf, blocksize, blocknumber, inspectfileobject,
131131
if (ncol(S) == (ncol(data) - 1)) {
132132
# this block has time gaps while the previous block did not
133133
S = cbind(S, 1)
134-
colnames(S)[4] = "remaining_epochs"
134+
colnames(S)[ncol(S)] = "remaining_epochs"
135135
}
136136
} else if ("remaining_epochs" %in% colnames(S)) {
137137
if ((ncol(S) - 1) == ncol(data)) {

R/runActimetric.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,8 @@ runActimetric = function(input_directory = NULL, output_directory = NULL, studyn
217217
hvars = GGIR::g.extractheadervars(I)
218218
sf = I$sf
219219
# Extract parameters for reading file in chunks as in GGIR R package
220-
readParams = GGIR::get_nw_clip_block_params(chunksize = 1, dynrange = 8,
221-
monc = I$monc, dformat = I$dformc,
222-
sf = sf, rmc.dynamic_range = NULL)
220+
readParams = GGIR::get_nw_clip_block_params(monc = I$monc, dformat = I$dformc,
221+
sf = sf, params_rawdata = GGIR::load_params()$params_rawdata)
223222
blocksize = readParams$blocksize
224223
isLastBlock = FALSE
225224
blocknumber = 1; iteration = 1

0 commit comments

Comments
 (0)