Last updated on 2024-03-29 01:51:10 CET.
Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
---|---|---|---|---|---|---|
r-devel-linux-x86_64-debian-clang | 1.0.4 | 4.75 | 156.91 | 161.66 | NOTE | |
r-devel-linux-x86_64-debian-gcc | 1.0.4 | 2.85 | 90.20 | 93.05 | NOTE | |
r-devel-linux-x86_64-fedora-clang | 1.0.4 | 82.29 | NOTE | |||
r-devel-linux-x86_64-fedora-gcc | 1.0.4 | 222.02 | NOTE | |||
r-devel-windows-x86_64 | 1.0.4 | 4.00 | 3239.00 | 3243.00 | ERROR | |
r-patched-linux-x86_64 | 1.0.4 | 5.33 | 158.35 | 163.68 | NOTE | |
r-release-linux-x86_64 | 1.0.4 | 4.38 | 58.56 | 62.94 | NOTE | |
r-release-macos-arm64 | 1.0.4 | 38.00 | NOTE | |||
r-release-macos-x86_64 | 1.0.4 | 55.00 | NOTE | |||
r-release-windows-x86_64 | 1.0.4 | 6.00 | 91.00 | 97.00 | NOTE | |
r-oldrel-macos-arm64 | 1.0.4 | 39.00 | OK | |||
r-oldrel-windows-x86_64 | 1.0.4 | 32.00 | 107.00 | 139.00 | OK |
Version: 1.0.4
Check: Rd files
Result: NOTE
checkRd: (-1) size_t-class.Rd:6: Escaped LaTeX specials: \_
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64, r-patched-linux-x86_64, r-release-linux-x86_64, r-release-macos-arm64, r-release-macos-x86_64, r-release-windows-x86_64
Version: 1.0.4
Check: tests
Result: ERROR
Running 'ceil.R' [171s]
Running 'cell.R' [153s]
Running 'eye.R' [170s]
Running 'factors.R' [258s]
Running 'fileparts.R' [0s]
Running 'find.R' [155s]
Running 'fix.R' [148s]
Running 'fliplr.R' [0s]
Running 'flipud.R' [0s]
Running 'fullfile.R' [146s]
Running 'hilb.R' [169s]
Running 'isempty.R' [0s]
Running 'isprime.R' [0s]
Running 'jet.colors.R' [0s]
Running 'linspace.R' [0s]
Running 'logspace.R' [173s]
Running 'magic.R' [0s]
Running 'meshgrid.R' [147s]
Running 'mkconstarray.R' [169s]
Running 'mod.R' [0s]
Running 'ndims.R' [165s]
Running 'nextpow2.R' [166s]
Running 'numel.R' [151s]
Running 'ones.R' [0s]
Running 'padarray.R' [169s]
Running 'pascal.R' [0s]
Running 'pow2.R' [0s]
Running 'primes.R' [169s]
Running 'rem.R' [0s]
Running 'repmat.R' [168s]
Running 'reshape.R' [0s]
Running 'rot90.R' [0s]
Running 'size.R' [0s]
Running 'std.R' [0s]
Running 'strcmp.R' [0s]
Running 'sum.R' [153s]
Running 'tictoc.R' [7s]
Running 'vander.R' [172s]
Running 'zeros.R' [0s]
Running the tests in 'tests/ceil.R' failed.
Complete output:
> ###
> ### $Id: ceil.R 22 2022-05-30 18:03:47Z proebuck $
> ###
>
>
> ##-----------------------------------------------------------------------------
> test.ceil <- function(input, expected) {
+ output <- do.call(getFromNamespace("ceil", "matlab"), input)
+ identical(output, expected)
+ }
>
> X <- c(-1.9, -0.2, 3.4, 5.6, 7)
> ceil.expected <- c(-1, 0, 4, 6, 7)
>
> test.ceil(list(X), ceil.expected)
[1] TRUE
>
>
> proc.time()
user system elapsed
0.31 0.03 0.31
Running the tests in 'tests/cell.R' failed.
Complete output:
> ###
> ### $Id: cell.R 22 2022-05-30 18:03:47Z proebuck $
> ###
>
>
> ##-----------------------------------------------------------------------------
> test.cell <- function(input, expected) {
+ output <- do.call(getFromNamespace("cell", "matlab"), input)
+ identical(output, expected)
+ }
>
> cell.expected.2x2 <- list()
> length(cell.expected.2x2) <- prod(dims <- c(2, 2))
> dim(cell.expected.2x2) <- dims
>
> cell.expected.4x2 <- list()
> length(cell.expected.4x2) <- prod(dims <- c(4, 2))
> dim(cell.expected.4x2) <- dims
>
> test.cell(list(n = 2), cell.expected.2x2)
[1] FALSE
> test.cell(list(n = c(4, 2)), cell.expected.4x2)
[1] FALSE
> test.cell(list(n = 4, m = 2), cell.expected.4x2)
[1] FALSE
> test.cell(list(n = matlab::size(matlab::ones(2))), cell.expected.2x2)
[1] FALSE
>
>
> proc.time()
user system elapsed
0.28 0.09 0.35
Running the tests in 'tests/eye.R' failed.
Complete output:
> ###
> ### $Id: eye.R 22 2022-05-30 18:03:47Z proebuck $
> ###
>
>
> ##-----------------------------------------------------------------------------
> test.eye <- function(input, expected) {
+ output <- do.call(getFromNamespace("eye", "matlab"), input)
+ identical(output, expected)
+ }
>
> eye.expected.3x3 <- matrix(c(1, 0, 0,
+ 0, 1, 0,
+ 0, 0, 1), nrow = 3, ncol = 3, byrow = TRUE)
> eye.expected.4x2 <- matrix(c(1, 0,
+ 0, 1,
+ 0, 0,
+ 0, 0), nrow = 4, ncol = 2, byrow = TRUE)
>
> test.eye(list(m = 3), eye.expected.3x3)
[1] TRUE
> test.eye(list(m = c(4, 2)), eye.expected.4x2)
[1] TRUE
> test.eye(list(m = 4, n = 2), eye.expected.4x2)
[1] TRUE
> test.eye(list(m = matlab::size(eye.expected.4x2)), eye.expected.4x2)
[1] TRUE
>
>
> proc.time()
user system elapsed
0.26 0.06 0.31
Running the tests in 'tests/factors.R' failed.
Complete output:
> ###
> ### $Id: factors.R 22 2022-05-30 18:03:47Z proebuck $
> ###
>
>
> ##-----------------------------------------------------------------------------
> test.factors <- function(input, expected) {
+ output <- do.call(getFromNamespace("factors", "matlab"), input)
+ identical(output, expected)
+ }
>
> factors.expected.n2 <- 2
> factors.expected.n3 <- 3
> factors.expected.prm <- 999983
> factors.expected.pr2 <- c(9999889, 9999901)
> factors.expected.prp <- c(65003, 65003)
> factors.expected.nn <- c(2, 2, 2, 2, 2, 3, 3, 3, 3, 5, 5, 5, 7, 7, 11)
> factors.expected.nm <- c(99989, 99991, 100003)
> factors.expected.n32 <- c(3, 5, 17, 257, 65537)
>
> test.factors(list(n=2), factors.expected.n2)
[1] TRUE
> test.factors(list(n=3), factors.expected.n3)
[1] TRUE
> test.factors(list(n=999983), factors.expected.prm)
[1] TRUE
> #test.factors(list(n=9999889*9999901), factors.expected.pr2)
> test.factors(list(n=4225390009), factors.expected.prp)
[1] TRUE
> test.factors(list(n=2^5 * 3^4 * 5^3 * 7^2 * 11), factors.expected.nn)
[1] TRUE
> test.factors(list(n=99989*99991*100003), factors.expected.nm)
[1] TRUE
> test.factors(list(n=2^32-1), factors.expected.n32)
[1] TRUE
>
>
> proc.time()
user system elapsed
21.56 60.67 82.21
Running the tests in 'tests/find.R' failed.
Complete output:
> ###
> ### $Id: find.R 22 2022-05-30 18:03:47Z proebuck $
> ###
>
>
> ##-----------------------------------------------------------------------------
> test.find <- function(input, expected) {
+ output <- do.call(getFromNamespace("find", "matlab"), input)
+ identical(output, expected)
+ }
>
> X <- c(3, 2, 1, 1, 2, 3)
> find.expected.eq.one <- c(3, 4)
>
> test.find(list(X == 1), find.expected.eq.one)
[1] FALSE
>
> X <- c(1, 0, 4, -3, 0, 0, 0, 8, 6)
> find.expected.nonzero <- c(1, 3, 4, 8, 9)
> find.expected.gt.two <- c(3, 8, 9)
>
> test.find(list(X), find.expected.nonzero)
[1] FALSE
> test.find(list(X > 2), find.expected.gt.two)
[1] FALSE
>
>
> proc.time()
user system elapsed
0.20 0.07 0.26
Running the tests in 'tests/fix.R' failed.
Complete output:
> ###
> ### $Id: fix.R 22 2022-05-30 18:03:47Z proebuck $
> ###
>
>
> ##-----------------------------------------------------------------------------
> test.fix <- function(input, expected) {
+ output <- do.call(getFromNamespace("fix", "matlab"), input)
+ identical(output, expected)
+ }
>
> X <- c(-1.9, -0.2, 3.4, 5.6, 7.0)
> fix.expected <- c(-1, 0, 3, 5, 7)
>
> test.fix(list(X), fix.expected)
[1] TRUE
>
>
> proc.time()
user system elapsed
0.17 0.03 0.20
Running the tests in 'tests/fullfile.R' failed.
Complete output:
> ###
> ### $Id: fullfile.R 22 2022-05-30 18:03:47Z proebuck $
> ###
>
>
> ##-----------------------------------------------------------------------------
> test.fullfile <- function(input, expected) {
+ output <- do.call(getFromNamespace("fullfile", "matlab"), input)
+ identical(output, expected)
+ }
>
> fullfile.expected <- file.path(path.expand("~"), "somedir", "foo.txt")
>
> test.fullfile(list(dir = path.expand("~"),
+ subdir = "somedir",
+ file = "foo.txt"), fullfile.expected)
[1] TRUE
>
>
> proc.time()
user system elapsed
0.23 0.06 0.28
Running the tests in 'tests/hilb.R' failed.
Complete output:
> ###
> ### $Id: hilb.R 22 2022-05-30 18:03:47Z proebuck $
> ###
>
>
> ##-----------------------------------------------------------------------------
> test.hilb <- function(input, expected) {
+ output <- do.call(getFromNamespace("hilb", "matlab"), input)
+ identical(output, expected)
+ }
>
> hilb.expected.na.nodim <- matrix(NA, nrow=0, ncol=0)
> hilb.expected.zero.nodim <- matrix(0, nrow=0, ncol=0)
> hilb.expected.one <- matrix(1, nrow=1, ncol=1)
> hilb.expected.five <- 1 / matrix(c(1:5,2:6,3:7,4:8,5:9), nrow=5, ncol=5)
>
> test.hilb(list(n=-1), hilb.expected.na.nodim)
[1] TRUE
> test.hilb(list(n=0), hilb.expected.zero.nodim)
[1] TRUE
> test.hilb(list(n=1), hilb.expected.one)
[1] TRUE
> test.hilb(list(n=5), hilb.expected.five)
[1] TRUE
>
>
> proc.time()
user system elapsed
0.17 0.15 0.29
Running the tests in 'tests/logspace.R' failed.
Complete output:
> ###
> ### $Id: logspace.R 22 2022-05-30 18:03:47Z proebuck $
> ###
>
>
> ##-----------------------------------------------------------------------------
> test.logspace <- function(input, expected) {
+ output <- do.call(getFromNamespace("logspace", "matlab"), input)
+ identical(all.equal(output,
+ expected,
+ tolerance = 0.0001),
+ TRUE)
+ }
>
> logspace.expected.1topi <- c(10.0000, 7.4866, 5.6050, 4.1963, 3.1416)
>
> test.logspace(list(a = 1, b = pi, n = 5), logspace.expected.1topi)
[1] TRUE
>
> ## more rigorously this time
> test.logspace(list(a = 0, b = 1, n = 0), 10) ## HWB 2011/02/03
[1] TRUE
> test.logspace(list(a = 0, b = 10, n = 1), 10^10) ## HWB 2011/02/03
[1] TRUE
> test.logspace(list(a = 0, b = 1, n = 1.5), 10) ## HWB 2011/02/03
[1] TRUE
>
>
> proc.time()
user system elapsed
0.29 0.06 0.29
Running the tests in 'tests/meshgrid.R' failed.
Complete output:
> ###
> ### $Id: meshgrid.R 22 2022-05-30 18:03:47Z proebuck $
> ###
>
>
> ##-----------------------------------------------------------------------------
> test.meshgrid <- function(input, expected) {
+ output <- do.call(getFromNamespace("meshgrid", "matlab"), input)
+ identical(output, expected)
+ }
>
> x1 <- 1:3
> y1 <- 10:14
> meshgrid.expected.xy <- list(x = matrix(rep(x1, length(y1)),
+ nrow = length(y1),
+ ncol = length(x1), byrow = TRUE),
+ y = matrix(rep(y1, length(x1)),
+ nrow = length(y1),
+ ncol = length(x1)))
>
> test.meshgrid(list(x = 0), meshgrid.expected.xy)
[1] FALSE
> test.meshgrid(list(x = x1, y = y1), meshgrid.expected.xy)
[1] TRUE
>
> x2 <- 5:8
> y2 <- 10:14
> z2 <- 2:3
> meshgrid.expected.xyz <- list(x = array(matrix(rep(x2, length(y2)),
+ nrow = length(y2),
+ ncol = length(x2), byrow = TRUE),
+ c(length(y2), length(x2), length(z2))),
+ y = array(rep(y2, length(x2)),
+ c(length(y2), length(x2), length(z2))),
+ z = array(sapply(z2,
+ function(val, len) rep(val, len),
+ length(y2) * length(x2)),
+ c(length(y2), length(x2), length(z2))))
>
> test.meshgrid(list(x = x2, y = y2, z = z2, nargout = 3), meshgrid.expected.xyz)
[1] TRUE
>
>
> proc.time()
user system elapsed
0.28 0.03 0.28
Running the tests in 'tests/mkconstarray.R' failed.
Complete output:
> ###
> ### $Id: mkconstarray.R 22 2022-05-30 18:03:47Z proebuck $
> ###
>
>
> ##-----------------------------------------------------------------------------
> test.mkconstarray <- function(input, expected) {
+ output <- do.call(getFromNamespace("mkconstarray", "matlab"), input)
+ identical(output, expected)
+ }
>
> test.mkconstarray(list(class.type = "double", value = pi, size = 4), rep(pi, 4))
[1] FALSE
>
>
> proc.time()
user system elapsed
0.26 0.04 0.29
Running the tests in 'tests/ndims.R' failed.
Complete output:
> ###
> ### $Id: ndims.R 22 2022-05-30 18:03:47Z proebuck $
> ###
>
>
> ##-----------------------------------------------------------------------------
> test.ndims <- function(input, expected) {
+ output <- do.call(getFromNamespace("ndims", "matlab"), input)
+ identical(output, expected)
+ }
>
> test.ndims(list(A = array(NA, c(4, 4, 2))), 3)
[1] FALSE
> test.ndims(list(A = matlab::magic(4)), 2)
[1] FALSE
> test.ndims(list(A = 1:5), 2)
[1] FALSE
>
>
> proc.time()
user system elapsed
0.25 0.06 0.29
Running the tests in 'tests/nextpow2.R' failed.
Complete output:
> ###
> ### $Id: nextpow2.R 22 2022-05-30 18:03:47Z proebuck $
> ###
>
>
> ##-----------------------------------------------------------------------------
> test.nextpow2 <- function(input, expected) {
+ output <- do.call(getFromNamespace("nextpow2", "matlab"), input)
+ identical(output, expected)
+ }
>
> nextpow2.expected.0 <- 0
> nextpow2.expected.vector <- c(0, 1, 2, 2, 3, 3, 3, 3, 4, 4)
> nextpow2.expected.matrix <- matrix(c(0, 1, 1, 0), nrow=2, ncol=2)
> nextpow2.expected.16 <- 4
> nextpow2.expected.m16 <- 4
> nextpow2.expected.m6 <- -19
> nextpow2.expected.mq <- -2
>
> test.nextpow2(list(x=0), nextpow2.expected.0)
[1] TRUE
> test.nextpow2(list(x=1:10), nextpow2.expected.vector)
[1] TRUE
> test.nextpow2(list(x=matrix(c(1i, 2i, 2+0i, 0+0i), nrow=2, ncol=2)),
+ nextpow2.expected.matrix)
[1] TRUE
> test.nextpow2(list(x=16), nextpow2.expected.16)
[1] TRUE
> test.nextpow2(list(x=-16), nextpow2.expected.m16)
[1] TRUE
> test.nextpow2(list(x=1e-6), nextpow2.expected.m6)
[1] TRUE
> test.nextpow2(list(x=-0.25), nextpow2.expected.mq)
[1] TRUE
>
>
> proc.time()
user system elapsed
0.31 0.07 0.32
Running the tests in 'tests/numel.R' failed.
Complete output:
> ###
> ### $Id: numel.R 22 2022-05-30 18:03:47Z proebuck $
> ###
>
>
> ##-----------------------------------------------------------------------------
> test.numel <- function(input, expected) {
+ output <- do.call(getFromNamespace("numel", "matlab"), input)
+ identical(output, expected)
+ }
>
> a <- array(NA, c(4, 4, 2))
> a[,,1] <- matlab::magic(4)
> a[,,2] <- t(a[,,1])
>
> numel.expected.4x4x2 <- 32
>
> test.numel(list(A = a), numel.expected.4x4x2)
[1] TRUE
>
>
> proc.time()
user system elapsed
0.15 0.10 0.25
Running the tests in 'tests/padarray.R' failed.
Complete output:
> ###
> ### $Id: padarray.R 22 2022-05-30 18:03:47Z proebuck $
> ###
>
>
> ##-----------------------------------------------------------------------------
> test.padarray <- function(input, expected) {
+ output <- do.call(getFromNamespace("padarray", "matlab"), input)
+ identical(output, expected)
+ }
>
>
> ## Add three elements of padding to beginning of vector
> ## The padding elements contain mirror copies of the array
> padarray.expected.mat4x4 <- matrix(1:4, 4, 4, byrow = TRUE)
> test.padarray(list(A = 1:4,
+ padsize = 3,
+ padval = "symmetric",
+ direction = "pre"),
+ padarray.expected.mat4x4)
[1] TRUE
>
> ## Add three elements of padding to the end of the first dimension of array
> ## and two elements of padding to the end of the second dimension.
> ## Use value of the last array element as the padding value.
> Amat.2x2 <- matrix(as.numeric(1:4), nrow = 2, ncol = 2, byrow = TRUE)
> padarray.expected.mat5x4 <- matrix(c(1, 2, 2, 2,
+ 3, 4, 4, 4,
+ 3, 4, 4, 4,
+ 3, 4, 4, 4,
+ 3, 4, 4, 4),
+ nrow = 5, ncol = 4, byrow = TRUE)
> test.padarray(list(A = Amat.2x2,
+ padsize = c(3, 2),
+ padval = "replicate",
+ direction = "post"),
+ padarray.expected.mat5x4)
[1] TRUE
>
> ## Add three elements of padding to each dimension of a three-dimensional array.
> ## Each pad element contains the value zero.
> Bmat.2x2 <- matrix(5:8, nrow = 2, ncol = 2, byrow = TRUE)
> Carr.2x2x2 <- array(c(Amat.2x2, Bmat.2x2), c(2, 2, 2))
> padarray.expected.arr8x8x2 <- {
+ A <- array(0, c(8, 8, 2))
+ A[4:5, 4:5, 1] <- Amat.2x2
+ A[4:5, 4:5, 2] <- Bmat.2x2
+ A
+ }
> test.padarray(list(A = Carr.2x2x2,
+ padsize = c(3, 3),
+ padval = 0,
+ direction = "both"),
+ padarray.expected.arr8x8x2)
[1] TRUE
>
> ## Add three elements of padding to end of vector
> ## The padding elements contain a mirror copy of the vector
> padarray.expected.vec <- c(letters[1:5], rev(letters[3:5]))
> test.padarray(list(A = letters[1:5],
+ padsize = c(0, 3),
+ padval = "symmetric",
+ direction = "post"),
+ padarray.expected.vec)
[1] TRUE
>
>
> proc.time()
user system elapsed
0.31 0.03 0.32
Running the tests in 'tests/primes.R' failed.
Complete output:
> ###
> ### $Id: primes.R 22 2022-05-30 18:03:47Z proebuck $
> ###
>
>
> ##-----------------------------------------------------------------------------
> test.primes <- function(input, expected) {
+ output <- do.call(getFromNamespace("primes", "matlab"), input)
+ identical(output, expected)
+ }
>
> primes.expected.101 <- c( 2, 3, 5, 7, 11,
+ 13, 17, 19, 23, 29,
+ 31, 37, 41, 43, 47,
+ 53, 59, 61, 67, 71,
+ 73, 79, 83, 89, 97, 101)
> primes.expected.n37 <- primes.expected.101[1:12]
> primes.expected.n13 <- primes.expected.101[1:6]
> primes.expected.n8 <- c(2, 3, 5, 7)
> primes.expected.n5 <- c(2, 3, 5)
> primes.expected.n3 <- c(2, 3)
> primes.expected.n2 <- 2
> primes.expected.n1 <- NULL
>
> test.primes(list(n=1), primes.expected.n1)
[1] TRUE
> test.primes(list(n=2), primes.expected.n2)
[1] TRUE
> test.primes(list(n=3), primes.expected.n3)
[1] TRUE
> test.primes(list(n=5), primes.expected.n5)
[1] TRUE
> test.primes(list(n=8), primes.expected.n8)
[1] TRUE
> test.primes(list(n=13), primes.expected.n13)
[1] TRUE
> test.primes(list(n=37), primes.expected.n37)
[1] TRUE
> test.primes(list(n=101), primes.expected.101)
[1] TRUE
>
>
> proc.time()
user system elapsed
0.26 0.10 0.31
Running the tests in 'tests/repmat.R' failed.
Complete output:
> ###
> ### $Id: repmat.R 22 2022-05-30 18:03:47Z proebuck $
> ###
>
>
> ##-----------------------------------------------------------------------------
> test.repmat <- function(input, expected) {
+ output <- do.call(getFromNamespace("repmat", "matlab"), input)
+ identical(output, expected)
+ }
>
> X.scalar <- 1
> repmat.expected.ones.3x3 <- matlab::ones(3)
> repmat.expected.ones.4x2 <- matlab::ones(4, 2)
> test.repmat(list(A = X.scalar, n = 3), repmat.expected.ones.3x3)
[1] TRUE
> test.repmat(list(A = X.scalar, m = c(4, 2)), repmat.expected.ones.4x2)
[1] TRUE
> test.repmat(list(A = X.scalar, m = 4, n = 2), repmat.expected.ones.4x2)
[1] TRUE
> test.repmat(list(A = X.scalar, n = matlab::size(repmat.expected.ones.4x2)),
+ repmat.expected.ones.4x2)
[1] TRUE
>
> X.mat <- matlab::eye(2)
> repmat.expected.pat1 <- matrix(c(rep(c(1,0), times=3), rep(c(0,1), times=3)),
+ nrow = 6,
+ ncol = 6)
> test.repmat(list(A = X.mat, m = 3), repmat.expected.pat1)
[1] TRUE
> test.repmat(list(A = X.mat[, 1], c(1, 1)), X.mat[, 1])
[1] TRUE
>
> X.vec <- as.numeric(1:8)
> repmat.expected.pat2 <- matrix(rep(X.vec, 5), nrow = 5, byrow = TRUE)
> test.repmat(list(A = as.matrix(X.vec), m = c(5, 1)), repmat.expected.pat2)
[1] TRUE
>
> X.str <- "value"
> repmat.expected.str <- matrix(rep(X.str, 4), nrow = 1)
> test.repmat(list(A = X.str, m = 1, n = 4), repmat.expected.str)
[1] TRUE
>
>
> proc.time()
user system elapsed
0.28 0.01 0.28
Running the tests in 'tests/sum.R' failed.
Complete output:
> ###
> ### $Id: sum.R 22 2022-05-30 18:03:47Z proebuck $
> ###
>
>
> ##-----------------------------------------------------------------------------
> test.sum <- function(input, expected) {
+ output <- do.call(getFromNamespace("sum", "matlab"), input)
+ identical(all.equal(output,
+ expected,
+ tolerance = 0.0001),
+ TRUE)
+ }
>
> X.vec <- 1:9
> sum.expected.vec <- 45
>
> cat("vector test", "\n")
vector test
> test.sum(list(x = X.vec, na.rm = FALSE), sum.expected.vec)
[1] TRUE
>
> X.mat <- matrix(X.vec, 3, 3, byrow = TRUE)
> sum.expected.mat.by.col <- c(12, 15, 18)
> sum.expected.mat.by.row <- c(6, 15, 24)
>
> cat("matrix test", "\n")
matrix test
> test.sum(list(x = X.mat, na.rm = FALSE), sum.expected.mat.by.col)
[1] TRUE
> test.sum(list(x = t(X.mat), na.rm = FALSE), sum.expected.mat.by.row)
[1] TRUE
>
> X.log <- c(TRUE, TRUE, FALSE, TRUE)
> sum.expected.log <- 3
>
> cat("logical test", "\n")
logical test
> test.sum(list(x = X.log, na.rm = FALSE), sum.expected.log)
[1] TRUE
>
>
> proc.time()
user system elapsed
0.20 0.17 0.36
Running the tests in 'tests/vander.R' failed.
Complete output:
> ###
> ### $Id: vander.R 22 2022-05-30 18:03:47Z proebuck $
> ###
>
>
> ##-----------------------------------------------------------------------------
> test.vander <- function(input, expected) {
+ output <- do.call(getFromNamespace("vander", "matlab"), input)
+ identical(output, expected)
+ }
>
> vander.expected.empty <- matrix(as.numeric(NA), nrow=0, ncol=0)
> vander.expected.scalar <- matrix(1.0, nrow=1, ncol=1)
> vander.expected.seq3 <- matrix(c( 1, 1, 1, 1, 1,
+ 5.0625, 3.375, 2.25, 1.5, 1,
+ 16, 8, 4, 2, 1,
+ 39.0625, 15.625, 6.25, 2.5, 1,
+ 81, 27, 9, 3, 1),
+ nrow=5, ncol=5, byrow=TRUE)
> vander.expected.complex <- matrix(c(-1, 0.0 + 1i, 1.0,
+ -4, 0.0 + 2i, 1.0,
+ -9, 0.0 + 3i, 1.0),
+ nrow=3, ncol=3, byrow=TRUE)
>
> test.vander(list(v=numeric()), vander.expected.empty)
[1] TRUE
> test.vander(list(v=1), vander.expected.scalar)
[1] TRUE
> test.vander(list(v=seq(from=1, to=3, by=0.5)), vander.expected.seq3)
[1] TRUE
> test.vander(list(v=c(1,2,3)*1i), vander.expected.complex)
[1] TRUE
>
>
> proc.time()
user system elapsed
0.21 0.10 0.31
Flavor: r-devel-windows-x86_64