Skip to content

Commit 87f71c8

Browse files
Fix variable name in obs_select_sec function for correct data.table reference
1 parent 8d4d424 commit 87f71c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/04_aggregate_obs.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ obs_select_sec <- function(
189189

190190
# Now, we group by 'window_id' and select the row with the minimum difference to that target
191191
mindif <- NULL
192-
df[, mindif := diff_to_target == min(diff_to_target), by = window_id]
192+
dt[, mindif := diff_to_target == min(diff_to_target), by = window_id]
193193
df <- dt[mindif == TRUE]
194194

195195
return(df)

0 commit comments

Comments
 (0)