Skip to content

Commit

Permalink
Add range information to splits in 'split.network.time.based.by.ranges'
Browse files Browse the repository at this point in the history
This change makes splitting by ranges more consistent with time-based
splitting.

This works towards se-sic#273.

Signed-off-by: Maximilian Löffler <[email protected]>
  • Loading branch information
maxloeffler committed Nov 12, 2024
1 parent bd0a8e9 commit f8c8042
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions util-split.R
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,9 @@ split.network.time.based.by.ranges = function(network, ranges, remove.isolates =
}
)

# add range information
names(nets.split) = sapply(ranges.bounds, paste, collapse = "-")

## convert ranges to bins
bins = get.bin.dates.from.ranges(ranges.bounds)
attr(nets.split, "bins") = bins
Expand Down

0 comments on commit f8c8042

Please sign in to comment.