Skip to content

Commit d1d7e31

Browse files
Avoid as.nanotime for ancient {nanotime}
1 parent 52b650c commit d1d7e31

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

inst/tests/other.Rraw

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -718,13 +718,13 @@ if (loaded[["nanotime"]]) {
718718
test(27, na.omit(DT), DT[c(1,3)])
719719

720720
# rbind with vectors with class attributes #5309
721-
x = data.table(a=1L, b=as.nanotime(0))
721+
x = data.table(a=1L, b=nanotime(0))
722722
y = data.table(a=2L, b=NA)
723-
test(27.01, rbind(x,y), data.table(a = c(1L, 2L), b=as.nanotime(c(0, NA))))
724-
test(27.02, rbind(y,x), data.table(a = c(2L, 1L), b=as.nanotime(c(NA, 0))))
723+
test(27.01, rbind(x,y), data.table(a = c(1L, 2L), b=nanotime(c(0, NA))))
724+
test(27.02, rbind(y,x), data.table(a = c(2L, 1L), b=nanotime(c(NA, 0))))
725725
y[, b := NULL]
726-
test(27.03, rbind(x,y, fill = TRUE), data.table(a = c(1L, 2L), b=as.nanotime(c(0, NA))))
727-
test(27.04, rbind(y,x, fill = TRUE), data.table(a = c(2L, 1L), b=as.nanotime(c(NA, 0))))
726+
test(27.03, rbind(x,y, fill = TRUE), data.table(a = c(1L, 2L), b=nanotime(c(0, NA))))
727+
test(27.04, rbind(y,x, fill = TRUE), data.table(a = c(2L, 1L), b=nanotime(c(NA, 0))))
728728

729729
# Was 1.91-1.94 in nafill.Rraw, #6139
730730
l = list(a=nanotime(c(1:2,NA,4:5)), b=nanotime(c(NA,2L,NA,4L,NA)))
@@ -784,7 +784,7 @@ if (loaded[["dplyr"]]) {
784784

785785
if (loaded[["nanotime"]]) {
786786
# respect dec=',' for nanotime, related to #6446, corresponding to tests 2281.*
787-
test(31, fwrite(data.table(as.nanotime(.POSIXct(0))), dec=',', sep=';'), output="1970-01-01T00:00:00,000000000Z")
787+
test(31, fwrite(data.table(nanotime(.POSIXct(0))), dec=',', sep=';'), output="1970-01-01T00:00:00,000000000Z")
788788
}
789789

790790
# tables() with large environment #6607

0 commit comments

Comments
 (0)