Skip to content

Commit 288fb6e

Browse files
committed
changed inclusive bound threshold detection to right exclusive bounds
1 parent 6e4fe0a commit 288fb6e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
* changed the behavior of all metric functions that calculate an in-between value (such as the duration of light between 250 and 1000 lux). Up until now, the function would use inclusive bounds on both sides, i.e. the value of 250 lux and 1000 lux would be included in the calculation. This is now changed to right exclusive bounds, i.e. the value of 250 lux will still be included in the calculation, whereas 1000 lux will not. While of little practical difference in a realistic dataset (where exact values matching the threshold are likely not present), it is relevant when calculating, e.g., the time spent in various levels of light or any other variable. The sum of those times should always add up to the total time. With inclusive bounds on both sides, the sum could theoretically be larger, with right exclusive bounds it cannot.
2+
13
* Import support for the `ClouClip` device.
24

35
* `import_Dataset()` no longer changes a pre-existing `Id` column (if it is not called `Id`). The function is also more informative for the daylight savings time handling in files with more than one Id.

R/helper.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ compare_threshold <- function(Light.vector,
109109
}
110110
else{
111111
threshold <- sort(threshold)
112-
out <- Light.vector >= threshold[1] & Light.vector <= threshold[2]
112+
out <- Light.vector >= threshold[1] & Light.vector < threshold[2]
113113
}
114114

115115
if(na.replace){

0 commit comments

Comments
 (0)