Skip to content

Commit c82fe7b

Browse files
committed
fix period handling
1 parent e5f703b commit c82fe7b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/sits_merge.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,10 @@ sits_merge.raster_cube <- function(data1, data2, ...) {
156156
d2_tl <- unique(as.Date(.cube_timeline(data2)[[1]]))
157157

158158
# get intervals
159-
d1_period <- as.numeric(
159+
d1_period <- as.integer(
160160
lubridate::as.period(lubridate::int_diff(d1_tl)), "days"
161161
)
162-
d2_period <- as.numeric(
162+
d2_period <- as.integer(
163163
lubridate::as.period(lubridate::int_diff(d2_tl)), "days"
164164
)
165165
# pre-condition - are periods regular?

0 commit comments

Comments
 (0)