CRAN Package Check Results for Package tensorA

Last updated on 2018-04-25 19:47:35 CEST.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.36 3.81 27.22 31.03 ERROR
r-devel-linux-x86_64-debian-gcc 0.36 2.83 21.74 24.57 ERROR
r-devel-linux-x86_64-fedora-clang 0.36 39.34 NOTE
r-devel-linux-x86_64-fedora-gcc 0.36 38.07 NOTE
r-devel-windows-ix86+x86_64 0.36 12.00 49.00 61.00 NOTE
r-patched-linux-x86_64 0.36 3.61 27.34 30.95 ERROR
r-patched-solaris-x86 0.36 56.80 NOTE
r-release-linux-x86_64 0.36 3.39 27.24 30.63 ERROR
r-release-windows-ix86+x86_64 0.36 12.00 49.00 61.00 NOTE
r-release-osx-x86_64 0.36 NOTE
r-oldrel-windows-ix86+x86_64 0.36 6.00 54.00 60.00 NOTE
r-oldrel-osx-x86_64 0.36 NOTE

Check Details

Version: 0.36
Check: S3 generic/method consistency
Result: NOTE
    Found the following apparent S3 methods exported but not registered:
     $.tensor ^.tensor as.contravariate.character as.covariate.character
     as.tensor.default as.tensor.tensor is.contravariate.character
     is.contravariate.numeric is.contravariate.tensor
     is.covariate.character is.covariate.numeric is.covariate.tensor
     mean.tensor |.tensor
    See section ‘Registering S3 methods’ in the ‘Writing R Extensions’
    manual.
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-patched-linux-x86_64, r-patched-solaris-x86, r-release-linux-x86_64

Version: 0.36
Check: foreign function calls
Result: NOTE
    Calls with DUP:
     .C(tensoraCmulhelper, dimx = as.integer(c(outerx, inner, para)),
     as.integer(c(inner, outery, para)), as.integer(c(outerx,
     outery, para)), as.complex(X[xtidx]), as.complex(Y[ytidx]),
     erg = complex(outerx * outery * para), NAOK = TRUE, DUP = FALSE)
     .C(tensoramulhelper, dimx = as.integer(c(outerx, inner, para)),
     as.integer(c(inner, outery, para)), as.integer(c(outerx,
     outery, para)), as.numeric(X[xtidx]), as.numeric(Y[ytidx]),
     erg = numeric(outerx * outery * para), NAOK = TRUE, DUP = FALSE)
    DUP is no longer supported and will be ignored.
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-ix86+x86_64, r-patched-linux-x86_64, r-patched-solaris-x86, r-release-linux-x86_64, r-release-windows-ix86+x86_64, r-release-osx-x86_64, r-oldrel-windows-ix86+x86_64, r-oldrel-osx-x86_64

Version: 0.36
Check: Rd \usage sections
Result: NOTE
    S3 methods shown with full name in documentation object 'mean.tensor':
     ‘mean.tensor’
    
    S3 methods shown with full name in documentation object 'solve.tensor':
     ‘solve.tensor’
    
    The \usage entries for S3 methods should use the \method markup and not
    their full name.
    See chapter ‘Writing R documentation files’ in the ‘Writing R
    Extensions’ manual.
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-ix86+x86_64, r-patched-linux-x86_64, r-patched-solaris-x86, r-release-linux-x86_64, r-release-windows-ix86+x86_64, r-release-osx-x86_64, r-oldrel-windows-ix86+x86_64, r-oldrel-osx-x86_64

Version: 0.36
Check: compiled code
Result: NOTE
    File ‘tensorA/libs/tensorA.so’:
     Found no calls to: ‘R_registerRoutines’, ‘R_useDynamicSymbols’
    
    It is good practice to register native routines and to disable symbol
    search.
    
    See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual.
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-patched-linux-x86_64, r-release-linux-x86_64

Version: 0.36
Check: examples
Result: ERROR
    Running examples in ‘tensorA-Ex.R’ failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: as.tensor
    > ### Title: Coercion to a tensor
    > ### Aliases: as.tensor as.tensor.default as.tensor.tensor
    > ### Keywords: arith
    >
    > ### ** Examples
    >
    > A <- diag(5)
    > as.tensor(A)
    Error in UseMethod("as.tensor") :
     no applicable method for 'as.tensor' applied to an object of class "c('matrix', 'double', 'numeric')"
    Calls: as.tensor
    Execution halted
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-patched-linux-x86_64, r-release-linux-x86_64

Version: 0.36
Check: tests
Result: ERROR
     Running ‘checker.R’ [0s/1s]
    Running the tests in ‘tests/checker.R’ failed.
    Complete output:
     > require(tensorA)
     Loading required package: tensorA
    
     Attaching package: 'tensorA'
    
     The following object is masked from 'package:base':
    
     norm
    
     > if(FALSE) {
     + # Commands for testing
     + debugger()
     + rm(list=objects())
     + options(error=dump.frames)
     + detach("package:tensorA")
     + dyn.unload("/home/boogaart/R/tensorA/tests/../../tensorA.Rcheck/tensorA/libs/tensorA.so")
     + library(tensorA,lib.loc="../../tensorA.Rcheck")
     + }
     >
     > set.seed(23)
     >
     >
     > summary.tensor <- function(x,...) {
     + n <- level.tensor(x)
     + d <- dim(x)
     + dm <- pmin(d,1)
     + dm2<- pmin(d,2)
     + print(dim(x))
     + if( !all(sapply(dimnames(x),is.null))) print(dimnames(x))
     + if( prod(dim(x)) < 10 )
     + print(x)
     + else if( n == 1 )
     + print(x[1:min(length(x),10)])
     + else if( n == 2 )
     + print(x[1:dm[1],1:dm[2]])
     + else if( n == 3 )
     + print(x[1:dm[1],1:dm[2],1:dm2[3],drop=FALSE])
     + else if( n == 4 )
     + print(x[1:(dm2[1]),1:dm[1],1,1,drop=FALSE])
     + else if( n == 5 )
     + print(x[1:(dm2[1]),1:dm[1],1,1,1,drop=FALSE])
     + else if( n == 6 )
     + print(x[1:(dm2[1]),1:dm[1],1,1,1,1,drop=FALSE])
     + else
     + print(x[1:min(length(x),10)])
     + }
     >
     > checker <- function(x,y) UseMethod("checker")
     >
     > checker.default <- function(x,y) {
     + cat("Wrong type\n",deparse(match.call()),"\n---------------y=\n")
     + print(y)
     + cat("\n------------x=\n")
     + print(x)
     + stop("Unkown type")
     + }
     >
     >
     > checker.tensor <- function(x,y) {
     + if( !cmp(x,y) ) {
     + cat("Misfit\n",deparse(match.call()),"\n------------------y=\n")
     + print(y)
     + cat("\n-----------------------x=\n")
     + print(x)
     + # print(summary(x))
     + # print(summary(y))
     + stop("Missfit");
     + } else {
     + x
     + }
     + }
     >
     > print.tensor <- function(x){
     + print.default(unclass(x))
     + print(dim(x))
     + }
     >
     > cmp.tensor <- function(x,y) {
     + if(!is.null(names(y))) {
     + mat <- match(names(y),names(x))
     + if( any(is.na(mat)) ) {
     + print(names(y))
     + print(names(x))
     + return(FALSE)
     + }
     + else
     + x <- reorder.tensor(x,mat)
     + }
     + return( length(x)==length(y) && !any(is.na(x)) &&
     + sum(abs(c(x)-c(y))^2)<1E-10 &&
     + length(dim(x))==length(dim(y)) &&
     + !any(is.na(dim(x))) && !any(is.na(dim(y))) &&
     + all(dim(x)==dim(y)))
     + }
     >
     > cmp <- function(x,y) UseMethod("cmp")
     >
     > cmp.character <- function(x,y) {
     + return( length(x)==length(y) && all(x==y) )
     + }
     >
     >
     > cmp.numeric <- function(x,y){
     + if( length(x) != length(y) )
     + return(FALSE)
     + if(!is.null(names(y))) {
     + if( is.null(names(y)) || !all( names(x) %in% names(y) ) )
     + return(FALSE)
     + if( ! identical(any( x[match(names(y),names(x))]!=y ),FALSE) )
     + return(FALSE)
     + return(TRUE)
     + } else {
     + return(all(x==y))
     + }
     + }
     >
     > cmp.default <- function(x,y) identical(x,y)
     >
     > checker.numeric <- function(x,y) {
     + if( !cmp(x,y) ) {
     + cat("Misfit\n",deparse(match.call()),"\n-----------------y=\n")
     + print(y)
     + cat("\n-------------------------x=\n")
     + print(x)
     + stop("Missfit");
     + } else print(x)
     + }
     >
     >
     > checker.character <- function(x,y) {
     + if( !cmp(x,y) ) {
     + cat("Misfit\n",deparse(match.call()),"\n-----------------y=\n")
     + print(y)
     + cat("\n----------------------------y=\n")
     + print(x)
     + stop("Missfit");
     + } else print(x)
     + }
     >
     > checker.list <- function(x,y) {
     + if( length(x) != length(y) || identical(!all(mapply(cmp,x,y)),TRUE) ) {
     + cat("Misfit\n",deparse(match.call()),"\n---------------y=\n")
     + print(y)
     + cat("\n----------------------x=\n")
     + print(x)
     + stop("Missfit");
     + } else print(x)
     + }
     >
     > nn <- function(...,nn=list(...)) {
     + lapply(1:length(nn),function(i) paste(names(nn)[i],1:nn[[i]],sep=""))
     + }
     >
     >
     >
     > # to.tensor
     > I4 <- diag(4)
     > names(dim(I4))<-c("Q","z")
     > checker(to.tensor(I4,c(a=2,b=2)),
     + to.tensor(c(diag(4)),c(a=2,b=2,z=4)))
     , , 1
    
     b
     a [,1] [,2]
     [1,] 1 0
     [2,] 0 0
    
     , , 2
    
     b
     a [,1] [,2]
     [1,] 0 0
     [2,] 1 0
    
     , , 3
    
     b
     a [,1] [,2]
     [1,] 0 1
     [2,] 0 0
    
     , , 4
    
     b
     a [,1] [,2]
     [1,] 0 0
     [2,] 0 1
    
     a b z
     2 2 4
     >
     > dimnames(I4) <- nn(Q=4,z=4)
     > checker(to.tensor(I4,c(a=2,b=2),nn(a=2,b=2)),
     + to.tensor(c(diag(4)),c(a=2,b=2,z=4),nn(a=2,b=2,z=4)))
     , , z = z1
    
     b
     a b1 b2
     a1 1 0
     a2 0 0
    
     , , z = z2
    
     b
     a b1 b2
     a1 0 0
     a2 1 0
    
     , , z = z3
    
     b
     a b1 b2
     a1 0 1
     a2 0 0
    
     , , z = z4
    
     b
     a b1 b2
     a1 0 0
     a2 0 1
    
     a b z
     2 2 4
     >
     >
     > #
     >
     > KT5 <- to.tensor(rnorm(30),c(a=3,b=2,c=5),nn(a=3,b=2,c=5))
     > dim(KT5[[c=2]])
     a b
     3 2
     > dim(KT5[,,1:2])
     a b c
     3 2 2
     > summary(KT5)
     a b c
     3 2 5
     $a
     [1] "a1" "a2" "a3"
    
     $b
     [1] "b1" "b2"
    
     $c
     [1] "c1" "c2" "c3" "c4" "c5"
    
     , , 1
    
     b
     a [,1]
     [1,] 0.1932123
    
     , , 2
    
     b
     a [,1]
     [1,] -0.2780863
    
     a b c
     1 1 2
     >
     > KT5 <- to.tensor(rnorm(30),c(a=3,b=10,c=1),nn(a=3,b=10,c=1))
     > drop(KT5)
     b
     a b1 b2 b3 b4 b5 b6
     a1 -0.55320524 -1.2499273 1.307647 0.232875 0.9459580 -1.62920594
     a2 0.09818141 -0.2021117 -1.342935 1.042257 -0.9856255 0.09231624
     a3 -1.14666586 0.1775003 0.861083 1.329098 -1.2158668 -0.02211742
     b
     a b7 b8 b9 b10
     a1 0.5134779 -0.2384356 1.2208190 0.2772344
     a2 -0.2295536 -1.9978126 -0.8509239 0.9707189
     a3 1.2615159 0.7010760 -0.5636078 0.9526308
     a b
     3 10
     >
     > checker(as.tensor(KT5),KT5)
     Error in UseMethod("as.tensor") :
     no applicable method for 'as.tensor' applied to an object of class "tensor"
     Calls: checker -> as.tensor
     Execution halted
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-patched-linux-x86_64, r-release-linux-x86_64