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 Dec 7, 2024
1 parent 4b0d522 commit cb9aabf
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) = if (is.null(names(nets.split))) ranges else names(nets.split)

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

0 comments on commit cb9aabf

Please sign in to comment.