Skip to content

Commit f55ed35

Browse files
authored
replace old attributes name for rdevel windows (#7813)
* replace old attributes name * also replace in compressed files
1 parent 806ef72 commit f55ed35

4 files changed

Lines changed: 49 additions & 49 deletions

File tree

inst/tests/melt_1754.R.gz

-11 Bytes
Binary file not shown.

inst/tests/other.Rraw

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ xt = structure(
572572
94807600, 69620600, 76645300, 108.999954, 109.231255, 108.360008),
573573
class = c("xts", "zoo"), .indexCLASS = "Date", tclass = "Date", .indexTZ = "UTC", tzone = "UTC",
574574
index = structure(c(1167782400, 1167868800, 1167955200), tzone = "UTC", tclass = "Date"),
575-
.Dim = c(3L, 6L), .Dimnames = list(NULL, c("SPY.Open", "SPY.High", "SPY.Low", "SPY.Close", "SPY.Volume", "SPY.Adjusted"))
575+
dim = c(3L, 6L), dimnames = list(NULL, c("SPY.Open", "SPY.High", "SPY.Low", "SPY.Close", "SPY.Volume", "SPY.Adjusted"))
576576
)
577577
local({
578578
old = options(datatable.verbose=TRUE); on.exit(options(old))
@@ -585,14 +585,14 @@ local({
585585
c(141.330002, 141.399994, 140.380005, 140.539993, 76645300, 108.360008),
586586
class = c("xts", "zoo"), .indexCLASS = "Date", tclass = "Date", .indexTZ = "UTC", tzone = "UTC",
587587
index = structure(1167955200, tzone = "UTC", tclass = "Date"),
588-
.Dim = c(1L, 6L), .Dimnames = list(NULL, c("SPY.Open", "SPY.High", "SPY.Low", "SPY.Close", "SPY.Volume", "SPY.Adjusted"))
588+
dim = c(1L, 6L), dimnames = list(NULL, c("SPY.Open", "SPY.High", "SPY.Low", "SPY.Close", "SPY.Volume", "SPY.Adjusted"))
589589
)
590590
xt_last2 = structure(
591591
c(141.229996, 141.330002, 142.050003, 141.399994, 140.610001, 140.380005,
592592
141.669998, 140.539993, 69620600, 76645300, 109.231255, 108.360008),
593593
class = c("xts", "zoo"), .indexCLASS = "Date", tclass = "Date", .indexTZ = "UTC", tzone = "UTC",
594594
index = structure(c(1167868800, 1167955200), tzone = "UTC", tclass = "Date"),
595-
.Dim = c(2L, 6L), .Dimnames = list(NULL, c("SPY.Open", "SPY.High", "SPY.Low", "SPY.Close", "SPY.Volume", "SPY.Adjusted"))
595+
dim = c(2L, 6L), dimnames = list(NULL, c("SPY.Open", "SPY.High", "SPY.Low", "SPY.Close", "SPY.Volume", "SPY.Adjusted"))
596596
)
597597
test(19.25, last(xt), xt_last, output="using xts::last: is.xts(x)")
598598
test(19.26, last(xt, n=2L), xt_last2, output="using xts::last: is.xts(x)")
@@ -604,13 +604,13 @@ local({
604604
c(142.25, 142.860001, 140.570007, 141.369995, 94807600, 108.999954),
605605
class = c("xts", "zoo"), .indexCLASS = "Date", tclass = "Date", .indexTZ = "UTC", tzone = "UTC",
606606
index = structure(1167782400, tzone = "UTC", tclass = "Date"),
607-
.Dim = c(1L, 6L), .Dimnames = list(NULL, c("SPY.Open", "SPY.High", "SPY.Low", "SPY.Close", "SPY.Volume", "SPY.Adjusted"))
607+
dim = c(1L, 6L), dimnames = list(NULL, c("SPY.Open", "SPY.High", "SPY.Low", "SPY.Close", "SPY.Volume", "SPY.Adjusted"))
608608
)
609609
xt_first2 = structure(
610610
c(142.25, 141.229996, 142.860001, 142.050003, 140.570007, 140.610001, 141.369995, 141.669998, 94807600, 69620600, 108.999954, 109.231255),
611611
class = c("xts", "zoo"), .indexCLASS = "Date", tclass = "Date", .indexTZ = "UTC", tzone = "UTC",
612612
index = structure(c(1167782400, 1167868800), tzone = "UTC", tclass = "Date"),
613-
.Dim = c(2L, 6L), .Dimnames = list(NULL, c("SPY.Open", "SPY.High", "SPY.Low", "SPY.Close", "SPY.Volume", "SPY.Adjusted"))
613+
dim = c(2L, 6L), dimnames = list(NULL, c("SPY.Open", "SPY.High", "SPY.Low", "SPY.Close", "SPY.Volume", "SPY.Adjusted"))
614614
)
615615
test(19.35, first(xt), xt_first, output="using xts::first: is.xts(x)")
616616
test(19.36, first(xt, n=2L), xt_first2, output="using xts::first: is.xts(x)")
@@ -637,11 +637,11 @@ local({
637637
test(19.71, first(df), structure(list(a=1L, b=3L), row.names=1L, class="data.frame"), output="using 'x[1L,]': !is.xts(x) & !nargs>1 & is.data.frame(x)")
638638
test(19.72, first(dt), data.table(a=1L, b=3L), output="using 'x[1L,]': !is.xts(x) & !nargs>1 & is.data.frame(x)")
639639
# matrix/array utils::tail behavior is likely to change in future R, Michael is more in the topic
640-
test(19.81, last(mx), structure(c(3L, 6L, 9L), .Dim = c(1L, 3L), .Dimnames = list("[3,]", NULL)), output="using utils::tail: !is.xts(x) & !nargs>1 & !is.null(dim(x)) & !is.data.frame(x)")
641-
expected = if (base::getRversion() < "3.7.0") 27L else structure(c(3L, 6L, 9L, 12L, 15L, 18L, 21L, 24L, 27L), .Dim = c(1L, 3L, 3L), .Dimnames = list("[3,]", NULL, NULL)) #4127
640+
test(19.81, last(mx), structure(c(3L, 6L, 9L), dim = c(1L, 3L), dimnames = list("[3,]", NULL)), output="using utils::tail: !is.xts(x) & !nargs>1 & !is.null(dim(x)) & !is.data.frame(x)")
641+
expected = if (base::getRversion() < "3.7.0") 27L else structure(c(3L, 6L, 9L, 12L, 15L, 18L, 21L, 24L, 27L), dim = c(1L, 3L, 3L), dimnames = list("[3,]", NULL, NULL)) #4127
642642
test(19.82, last(ar), expected, output="using utils::tail: !is.xts(x) & !nargs>1 & !is.null(dim(x)) & !is.data.frame(x)")
643-
test(19.91, first(mx), structure(c(1L, 4L, 7L), .Dim = c(1L, 3L)), output="using utils::head: !is.xts(x) & !nargs>1 & !is.null(dim(x)) & !is.data.frame(x)")
644-
expected = if (base::getRversion() < "3.7.0") 1L else structure(c(1L, 4L, 7L, 10L, 13L, 16L, 19L, 22L, 25L), .Dim = c(1L, 3L, 3L)) #4127
643+
test(19.91, first(mx), structure(c(1L, 4L, 7L), dim = c(1L, 3L)), output="using utils::head: !is.xts(x) & !nargs>1 & !is.null(dim(x)) & !is.data.frame(x)")
644+
expected = if (base::getRversion() < "3.7.0") 1L else structure(c(1L, 4L, 7L, 10L, 13L, 16L, 19L, 22L, 25L), dim = c(1L, 3L, 3L)) #4127
645645
test(19.92, first(ar), expected, output="using utils::head: !is.xts(x) & !nargs>1 & !is.null(dim(x)) & !is.data.frame(x)")
646646
})
647647

inst/tests/programming.Rraw

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ cor_xy3 = function(xdt, ydt, x, y) { ## cor matrix of existing columns and dynam
583583
cor_mx = cor_xy3(xdt, ydt, c("x1", "x2"), ycols)
584584
exp = structure(c(
585585
1, 0.242249239102964, -0.0286729531730845, -0.0936087330415663, 0.245575245812681, 0.323778522797129, 0.242249239102964, 1, 0.199165327684089, -0.160954354243643, 0.0034174556771777, 0.185518712777259, -0.0286729531730845, 0.199165327684089, 1, -0.164047186655086, -0.0689536633998918, -0.0326400434160486, -0.0936087330415663, -0.160954354243643, -0.164047186655086, 1, -0.0810998892055976, -0.106457956110047, 0.245575245812681, 0.0034174556771777, -0.0689536633998918, -0.0810998892055976, 1, 0.324977066952494, 0.323778522797129, 0.185518712777259, -0.0326400434160486, -0.106457956110047, 0.324977066952494, 1
586-
), .Dim = c(6L, 6L), .Dimnames = list(
586+
), dim = c(6L, 6L), dimnames = list(
587587
c("x1", "x2", "y1", "y5", "y10", "y20"),
588588
c("x1", "x2", "y1", "y5", "y10", "y20")
589589
))

0 commit comments

Comments
 (0)