Skip to content

Commit cc4b912

Browse files
committed
avoid rounding to 3 decimal places in classify
1 parent 1013697 commit cc4b912

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

R/classify.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ classify = function(data = NULL, parameters = NULL, sf = NULL,
7373
ts = as.data.frame(cbind(subject, timestamp, ts))
7474
}
7575
# round numeric columns
76-
numeric_columns = sapply(ts, mode) == 'numeric'
77-
ts[numeric_columns] = round(ts[numeric_columns], 3)
7876
ts = do.call(data.frame,lapply(ts, function(x) replace(x, is.infinite(x), NA)))
7977
ts[is.na(ts)] = 0
8078
# -------------------------------------------------------------------------

R/runActimetric.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,8 @@ runActimetric = function(input_directory = NULL, output_directory = NULL, studyn
287287
nw = rep(0, nrow(data) / (epoch*sf))
288288
}
289289
}
290+
} else {
291+
nw = rep(0, nrow(data) / (epoch*sf))
290292
}
291293
nonwear = c(nonwear, nw)
292294
# enmo per epoch

0 commit comments

Comments
 (0)