Skip to content

Commit 7a4dc9b

Browse files
committed
Update test_kit.Rout.save
1 parent 2de3b68 commit 7a4dc9b

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

tests/test_kit.Rout.save

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -709,10 +709,10 @@ Attaching kit 0.0.12 (OPENMP enabled using 1 thread)
709709
> check("0005.002", psum(x, y, z, na.rm = TRUE), c(6, 7, 8, 7))
710710
> check("0005.003", psum(as.integer(x), as.integer(y), as.integer(z), na.rm = FALSE), c(6L, NA_integer_, NA_integer_, 7L))
711711
> check("0005.004", psum(as.integer(x), as.integer(y), as.integer(z), na.rm = TRUE), c(6L, 7L, 8L, 7L))
712-
> check("0005.005", psum(as.raw(z), y, na.rm = TRUE), error = "Argument 1 is of type raw. Only integer, double and complex types are supported.Data.frame (of the previous types) is also supported as a single input.")
712+
> check("0005.005", psum(as.raw(z), y, na.rm = TRUE), error = "Argument 1 is of type raw. Only integer/logical, double and complex types are supported. A data.frame (of the previous types) is also supported as a single input.")
713713
> check("0005.006", psum(x, y, 1:2, na.rm = FALSE), error = "Argument 3 is of length 2 but argument 1 is of length 4. If you wish to 'recycle' your argument, please use rep() to make this intent clear to the readers of your code.")
714714
> check("0005.007", psum(1:10, 1:5, na.rm = FALSE), error = "Argument 2 is of length 5 but argument 1 is of length 10. If you wish to 'recycle' your argument, please use rep() to make this intent clear to the readers of your code.")
715-
> check("0005.008", psum(x, as.raw(z), y, na.rm = TRUE), error = "Argument 2 is of type raw. Only integer, double and complex types are supported.")
715+
> check("0005.008", psum(x, as.raw(z), y, na.rm = TRUE), error = "Argument 2 is of type raw. Only integer/logical, double and complex types are supported.")
716716
> check("0005.009", psum(1:10, 1:10, 21:30), 1:10 + 1:10 + 21:30)
717717
> check("0005.010", psum(x, y, z, na.rm = NA), error = "Argument 'na.rm' must be TRUE or FALSE and length 1.")
718718
> check("0005.011", psum(x, na.rm = FALSE), x)
@@ -731,7 +731,7 @@ Attaching kit 0.0.12 (OPENMP enabled using 1 thread)
731731
> check("0005.024", psum(NA_real_, na.rm = TRUE), 0)
732732
> check("0005.025", psum(NA_complex_, na.rm = TRUE), 0+0i)
733733
> check("0005.026", psum(iris[,1:2]), rowSums(iris[,1:2]))
734-
> check("0005.027", psum(iris[,1:2],iris[,1:2]), error = "Argument 1 is of type list. Only integer, double and complex types are supported.Data.frame (of the previous types) is also supported as a single input.")
734+
> check("0005.027", psum(iris[,1:2],iris[,1:2]), error = "Argument 1 is of type list. Only integer/logical, double and complex types are supported. A data.frame (of the previous types) is also supported as a single input.")
735735
> check("0005.028", psum(1:150,iris$Species, na.rm = FALSE), error="Function 'psum' is not meaningful for factors.")
736736
> check("0005.029", psum(unclass(mtcars)),psum(mtcars))
737737
>
@@ -743,10 +743,10 @@ Attaching kit 0.0.12 (OPENMP enabled using 1 thread)
743743
> check("0006.002", pprod(x, y, z, na.rm = TRUE), c(6, 12, 16, 5))
744744
> check("0006.003", pprod(as.integer(x), as.integer(y), as.integer(z), na.rm = FALSE), c(6L, NA_integer_, NA_integer_, 5L))
745745
> check("0006.004", pprod(as.integer(x), as.integer(y), as.integer(z), na.rm = TRUE), c(6L, 12L, 16L, 5L))
746-
> check("0006.005", pprod(as.raw(z), y, na.rm = TRUE), error = "Argument 1 is of type raw. Only integer, double and complex types are supported.Data.frame (of the previous types) is also supported as a single input.")
746+
> check("0006.005", pprod(as.raw(z), y, na.rm = TRUE), error = "Argument 1 is of type raw. Only integer/logical, double and complex types are supported. A data.frame (of the previous types) is also supported as a single input.")
747747
> check("0006.006", pprod(x, y, 1:2, na.rm = FALSE), error = "Argument 3 is of length 2 but argument 1 is of length 4. If you wish to 'recycle' your argument, please use rep() to make this intent clear to the readers of your code.")
748748
> check("0006.007", pprod(1:10, 1:5, na.rm = FALSE), error = "Argument 2 is of length 5 but argument 1 is of length 10. If you wish to 'recycle' your argument, please use rep() to make this intent clear to the readers of your code.")
749-
> check("0006.008", pprod(x, as.raw(z), y, na.rm = TRUE), error = "Argument 2 is of type raw. Only integer, double and complex types are supported.")
749+
> check("0006.008", pprod(x, as.raw(z), y, na.rm = TRUE), error = "Argument 2 is of type raw. Only integer/logical, double and complex types are supported.")
750750
> check("0006.009", pprod(1:10, 1:10, 21:30), 1:10 * 1:10 * 21:30)
751751
> check("0006.010", pprod(x, y, z, na.rm = NA), error = "Argument 'na.rm' must be TRUE or FALSE and length 1.")
752752
> check("0006.011", pprod(x, na.rm = FALSE), x)
@@ -765,7 +765,7 @@ Attaching kit 0.0.12 (OPENMP enabled using 1 thread)
765765
> check("0006.024", pprod(NA_real_, na.rm = TRUE), 1)
766766
> check("0006.025", pprod(NA_complex_, na.rm = TRUE), 1+0i)
767767
> check("0006.026", pprod(iris[,1:2]), iris$Sepal.Length*iris$Sepal.Width)
768-
> check("0006.027", pprod(iris[,1:2],iris[,1:2]), error = "Argument 1 is of type list. Only integer, double and complex types are supported.Data.frame (of the previous types) is also supported as a single input.")
768+
> check("0006.027", pprod(iris[,1:2],iris[,1:2]), error = "Argument 1 is of type list. Only integer/logical, double and complex types are supported. A data.frame (of the previous types) is also supported as a single input.")
769769
> check("0006.028", pprod(1:150,iris$Species, na.rm = FALSE), error="Function 'pprod' is not meaningful for factors.")
770770
> check("0006.029", pprod(unclass(mtcars)),pprod(mtcars))
771771
>
@@ -1122,10 +1122,10 @@ Attaching kit 0.0.12 (OPENMP enabled using 1 thread)
11221122
>
11231123
> check("0011.001", pmean(x, y, z, na.rm = FALSE), sapply(1:4, function(i) mean(c(x[i], y[i], z[i]), na.rm = FALSE)))
11241124
> check("0011.002", pmean(x, y, z, na.rm = TRUE), sapply(1:4, function(i) mean(c(x[i], y[i], z[i]), na.rm = TRUE)))
1125-
> check("0011.003", pmean(as.raw(z), y, na.rm = TRUE), error = "Argument 1 is of type raw. Only integer and double types are supported.Data.frame (of the previous types) is also supported as a single input.")
1125+
> check("0011.003", pmean(as.raw(z), y, na.rm = TRUE), error = "Argument 1 is of type raw. Only integer/logical and double types are supported. A data.frame (of the previous types) is also supported as a single input.")
11261126
> check("0011.004", pmean(x, y, 1:2, na.rm = FALSE), error = "Argument 3 is of length 2 but argument 1 is of length 4. If you wish to 'recycle' your argument, please use rep() to make this intent clear to the readers of your code.")
11271127
> check("0011.005", pmean(1:10, 1:5, na.rm = FALSE), error = "Argument 2 is of length 5 but argument 1 is of length 10. If you wish to 'recycle' your argument, please use rep() to make this intent clear to the readers of your code.")
1128-
> check("0011.006", pmean(x, as.raw(z), y, na.rm = TRUE), error = "Argument 2 is of type raw. Only integer and double types are supported.")
1128+
> check("0011.006", pmean(x, as.raw(z), y, na.rm = TRUE), error = "Argument 2 is of type raw. Only integer/logical and double types are supported.")
11291129
> check("0011.007", pmean(x, y, z, na.rm = NA), error = "Argument 'na.rm' must be TRUE or FALSE and length 1.")
11301130
> check("0011.008", pmean(x, na.rm = FALSE), sapply(1:4, function(i) mean(c(x[i]), na.rm = FALSE)))
11311131
> check("0011.009", pmean(c(1,3,NA,5,NA), c(2,NA,4,1,NA), na.rm = TRUE), sapply(1:5, function(i) mean(c(c(1,3,NA,5,NA)[i], c(2,NA,4,1,NA)[i]), na.rm = TRUE)))
@@ -1761,7 +1761,7 @@ Attaching kit 0.0.12 (OPENMP enabled using 1 thread)
17611761
> check("0027.005", panyNA(x), c(FALSE, FALSE, TRUE, FALSE))
17621762
>
17631763
> rm(v,w,x,y,z,f1,d1)
1764-
>
1764+
>
17651765
> # --------------------------------------------------------------------------------------------------
17661766
> # pfirst and plast
17671767
> # --------------------------------------------------------------------------------------------------
@@ -1774,27 +1774,27 @@ Attaching kit 0.0.12 (OPENMP enabled using 1 thread)
17741774
> z1 = sample(c("e","f",NA),1e2,TRUE)
17751775
>
17761776
> base_pfirst <- function(...) {
1777-
> x = if(...length() == 1L && is.list(..1)) unclass(..1) else list(...)
1778-
> res = x[[1]]
1779-
> if(length(x) == 1L) return(res)
1780-
> for(i in 2:length(x)) {
1781-
> miss <- is.na(res)
1782-
> res[miss] <- x[[i]][miss]
1783-
> }
1784-
> res
1785-
> }
1777+
+ x = if(...length() == 1L && is.list(..1)) unclass(..1) else list(...)
1778+
+ res = x[[1]]
1779+
+ if(length(x) == 1L) return(res)
1780+
+ for(i in 2:length(x)) {
1781+
+ miss <- is.na(res)
1782+
+ res[miss] <- x[[i]][miss]
1783+
+ }
1784+
+ res
1785+
+ }
17861786
>
17871787
> base_plast <- function(...) {
1788-
> x = if(...length() == 1L && is.list(..1)) unclass(..1) else list(...)
1789-
> n = length(x)
1790-
> res = x[[n]]
1791-
> if(n == 1L) return(res)
1792-
> for(i in (n-1):1) {
1793-
> miss <- is.na(res)
1794-
> res[miss] <- x[[i]][miss]
1795-
> }
1796-
> res
1797-
> }
1788+
+ x = if(...length() == 1L && is.list(..1)) unclass(..1) else list(...)
1789+
+ n = length(x)
1790+
+ res = x[[n]]
1791+
+ if(n == 1L) return(res)
1792+
+ for(i in (n-1):1) {
1793+
+ miss <- is.na(res)
1794+
+ res[miss] <- x[[i]][miss]
1795+
+ }
1796+
+ res
1797+
+ }
17981798
>
17991799
> check("0028.001", pfirst(x, y, z), base_pfirst(x, y, z))
18001800
> check("0028.002", plast(x, y, z), base_plast(x, y, z))
@@ -1843,4 +1843,4 @@ Attaching kit 0.0.12 (OPENMP enabled using 1 thread)
18431843
>
18441844
> proc.time()
18451845
user system elapsed
1846-
4.251 0.614 4.957
1846+
4.188 0.501 4.694

0 commit comments

Comments
 (0)