Last updated on 2019-11-26 00:52:04 CET.
Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
---|---|---|---|---|---|---|
r-devel-linux-x86_64-debian-clang | 2.2.1 | 61.80 | 194.76 | 256.56 | ERROR | |
r-devel-linux-x86_64-debian-gcc | 2.2.1 | 44.56 | 148.08 | 192.64 | ERROR | |
r-devel-linux-x86_64-fedora-clang | 2.2.1 | 308.20 | NOTE | |||
r-devel-linux-x86_64-fedora-gcc | 2.2.1 | 302.87 | NOTE | |||
r-devel-windows-ix86+x86_64 | 2.2.1 | 151.00 | 444.00 | 595.00 | OK | |
r-devel-windows-ix86+x86_64-gcc8 | 2.2.1 | 118.00 | 339.00 | 457.00 | OK | |
r-patched-linux-x86_64 | 2.2.1 | 46.35 | 198.51 | 244.86 | OK | |
r-patched-solaris-x86 | 2.2.1 | 417.00 | NOTE | |||
r-release-linux-x86_64 | 2.2.1 | 52.17 | 211.55 | 263.72 | OK | |
r-release-windows-ix86+x86_64 | 2.2.1 | 137.00 | 352.00 | 489.00 | OK | |
r-release-osx-x86_64 | 2.2.1 | NOTE | ||||
r-oldrel-windows-ix86+x86_64 | 2.2.1 | 82.00 | 399.00 | 481.00 | OK | |
r-oldrel-osx-x86_64 | 2.2.1 | NOTE |
Version: 2.2.1
Check: examples
Result: ERROR
Running examples in 'rags2ridges-Ex.R' failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: optPenaltyPchordal
> ### Title: Automatic search for penalty parameter of ridge precision
> ### estimator with known chordal support
> ### Aliases: optPenaltyPchordal
>
> ### ** Examples
>
> # generate data
> p <- 8
> n <- 100
> set.seed(333)
> Y <- matrix(rnorm(n*p), nrow = n, ncol = p)
>
> # define zero structure
> S <- covML(Y)
> S[1:3, 6:8] <- 0
> S[6:8, 1:3] <- 0
> zeros <- which(S==0, arr.ind=TRUE)
>
> # obtain (triangulated) support info
> supportP <- support4ridgeP(nNodes=p, zeros=zeros)
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
at /tmp/RtmpQMW01o/R.INSTALL12c4345fe66/rags2ridges/R/rags2ridgesVariants.r#130:
--- package (from environment) ---
rags2ridges
--- call from context ---
support4ridgeP(nNodes = p, zeros = zeros)
--- call from argument ---
if (!is.null(zeros) & as.character(class(zeros)) != "matrix") {
stop("Input (zeros) is of wrong class.")
}
--- R stacktrace ---
where 1: support4ridgeP(nNodes = p, zeros = zeros)
--- value of length: 2 type: logical ---
[1] FALSE TRUE
--- function from context ---
function(adjMat=NULL,
nNodes=NULL,
zeros=NULL,
verbose=FALSE){
########################################################################
#
# DESCRIPTION:
# The zero pattern of an adjancency matrix is converted into its
# junction tree (as a list of its cliques and separators). When a
# graph with nondecomposable support is provided, it is triangulated.
#
# ARGUMENTS:
# -> adjMat : Adjacency matrix of an undirected graph.
# -> nNodes : Number of nodes of the graph.
# -> zeros : Matrix with indices of entries of the adjacency
# matrix that are constrained to zero. The matrix
# comprises two columns, each row corresponding to
# an entry of the adjacency matrix. The first
# column contains the row indices and the second
# the column indices. The specified graph should be
# undirected and decomposable. If not, it is
# symmetrized and triangulated.
# -> verbose : Logical indicating whether progress should be reported.
#
#
# DEPENDENCIES:
# require("igraph") # functions from package : graph.adjancency,
# igraph.to.graphNEL
# require("gRbase") # functions from package : triangulate
# require("RGBL") # functions from package : is.triangulated
# require("graph") # functions from package : 'graphAM'-class
#
########################################################################
# iput checks
if (is.null(adjMat) & is.null(nNodes) & is.null(zeros)){
stop("Support not sufficiently specified.")
}
if (is.null(adjMat) & is.null(nNodes)){
stop("Support not sufficiently specified.")
}
if (is.null(adjMat) & is.null(zeros)){
stop("Support not sufficiently specified.")
}
if (!is.null(adjMat)){
if (!is.matrix(adjMat)){
stop("adjMat should be a matrix.")
}
if (nrow(adjMat) != ncol(adjMat)){
stop("adjMat should be square matrix.")
}
if (!all(sort(unique(as.numeric(adjMat))) == c(0,1))){
stop("Elements of adjMat ill-specified.")
}
if (!isSymmetric(adjMat)){
stop("adjMat does not correspond to an undirect graph.")
}
if (!all(diag(adjMat) == 0)){
stop("adjMat contains nonzero diagonal element.")
}
}
if (!is.null(nNodes)){
if (class(nNodes) != "numeric" & class(nNodes) != "integer"){
stop("Input (nNodes) is of wrong class")
}
if (length(nNodes) != 1){
stop("Input (nNodes) must be a scalar")
}
if (!.is.int(nNodes)){
stop("Input (nNodes) should be an integer")
}
if (nNodes <= 0){
stop("Input (nNodes) must be strictly positive")
}
}
if (!is.null(zeros)){
if (!is.null(zeros) & as.character(class(zeros)) != "matrix"){
stop("Input (zeros) is of wrong class.")
}
if (!is.null(zeros)){
if(ncol(zeros) != 2){
stop("Wrong dimensions of the (zeros).")
}
}
if (!is.null(zeros)){
zeros <- zeros[order(zeros[,2], zeros[,1]),]
}
}
if (as.character(class(verbose)) != "logical"){
stop("Input (verbose) is of wrong class.")
}
# convert zero pattern into adjacency matrix
if (!is.null(zeros) & !is.null(nNodes) & is.null(adjMat)){
adjMat <- matrix(1, nNodes, nNodes)
adjMat[zeros] <- 0
adjMat[cbind(zeros[,2], zeros[,1])] <- 0
diag(adjMat) <- 0
}
# convert adjacency into graphNel object
G <- igraph::igraph.to.graphNEL(igraph::graph.adjacency(adjMat,
mode="undirected"))
# is graph complete?
is.complete(G)
# check whether a chordal support has been provided
addedEdges <- matrix(nrow=0, ncol=2)
if (!RBGL::is.triangulated(G)){
if(verbose){
cat("-> provided zero pattern not chordal : support is triangulated,", "\n")
}
nEdgesOld <- numEdges(G)
G <- gRbase::triangulate(G)
nEdgesNew <- numEdges(G)
addedEdges <- which(as(G, "graphAM")@adjMat - adjMat == 1,
arr.ind=TRUE)
adjMat <- as(G, "graphAM")@adjMat
diag(adjMat) <- 1
zeros <- which(adjMat == 0, arr.ind=TRUE)
if(verbose){
cat(paste("-> ",
nEdgesNew - nEdgesOld,
" extra nonzeros", sep=""), "\n")
}
}
if (is.null(zeros)){
diag(adjMat) <- 1
zeros <- which(adjMat == 0, arr.ind=TRUE)
}
# decompose in cliques and separators
decomp <- gRbase::rip(G)
Cliques <- decomp$cliques
Separators <- decomp$separators
# convert index vectors from character to integer
for (k in 1:length(Cliques)){
Cliques[[k]] <- as.integer(Cliques[[k]])
}
for (k in 1:length(Separators)){
Separators[[k]] <- as.integer(Separators[[k]])
}
return(list(zeros=zeros,
cliques=Cliques,
separators=Separators,
addedEdges=addedEdges))
}
<bytecode: 0x1106ab18>
<environment: namespace:rags2ridges>
--- function search by body ---
Function support4ridgeP in namespace rags2ridges has this body.
----------- END OF FAILURE REPORT --------------
Fatal error: the condition has length > 1
Flavor: r-devel-linux-x86_64-debian-clang
Version: 2.2.1
Check: examples
Result: ERROR
Running examples in ‘rags2ridges-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: optPenaltyPchordal
> ### Title: Automatic search for penalty parameter of ridge precision
> ### estimator with known chordal support
> ### Aliases: optPenaltyPchordal
>
> ### ** Examples
>
> # generate data
> p <- 8
> n <- 100
> set.seed(333)
> Y <- matrix(rnorm(n*p), nrow = n, ncol = p)
>
> # define zero structure
> S <- covML(Y)
> S[1:3, 6:8] <- 0
> S[6:8, 1:3] <- 0
> zeros <- which(S==0, arr.ind=TRUE)
>
> # obtain (triangulated) support info
> supportP <- support4ridgeP(nNodes=p, zeros=zeros)
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
at /home/hornik/tmp/scratch/RtmpS4O192/R.INSTALL7c8c3e1902b3/rags2ridges/R/rags2ridgesVariants.r#130:
--- package (from environment) ---
rags2ridges
--- call from context ---
support4ridgeP(nNodes = p, zeros = zeros)
--- call from argument ---
if (!is.null(zeros) & as.character(class(zeros)) != "matrix") {
stop("Input (zeros) is of wrong class.")
}
--- R stacktrace ---
where 1: support4ridgeP(nNodes = p, zeros = zeros)
--- value of length: 2 type: logical ---
[1] FALSE TRUE
--- function from context ---
function(adjMat=NULL,
nNodes=NULL,
zeros=NULL,
verbose=FALSE){
########################################################################
#
# DESCRIPTION:
# The zero pattern of an adjancency matrix is converted into its
# junction tree (as a list of its cliques and separators). When a
# graph with nondecomposable support is provided, it is triangulated.
#
# ARGUMENTS:
# -> adjMat : Adjacency matrix of an undirected graph.
# -> nNodes : Number of nodes of the graph.
# -> zeros : Matrix with indices of entries of the adjacency
# matrix that are constrained to zero. The matrix
# comprises two columns, each row corresponding to
# an entry of the adjacency matrix. The first
# column contains the row indices and the second
# the column indices. The specified graph should be
# undirected and decomposable. If not, it is
# symmetrized and triangulated.
# -> verbose : Logical indicating whether progress should be reported.
#
#
# DEPENDENCIES:
# require("igraph") # functions from package : graph.adjancency,
# igraph.to.graphNEL
# require("gRbase") # functions from package : triangulate
# require("RGBL") # functions from package : is.triangulated
# require("graph") # functions from package : 'graphAM'-class
#
########################################################################
# iput checks
if (is.null(adjMat) & is.null(nNodes) & is.null(zeros)){
stop("Support not sufficiently specified.")
}
if (is.null(adjMat) & is.null(nNodes)){
stop("Support not sufficiently specified.")
}
if (is.null(adjMat) & is.null(zeros)){
stop("Support not sufficiently specified.")
}
if (!is.null(adjMat)){
if (!is.matrix(adjMat)){
stop("adjMat should be a matrix.")
}
if (nrow(adjMat) != ncol(adjMat)){
stop("adjMat should be square matrix.")
}
if (!all(sort(unique(as.numeric(adjMat))) == c(0,1))){
stop("Elements of adjMat ill-specified.")
}
if (!isSymmetric(adjMat)){
stop("adjMat does not correspond to an undirect graph.")
}
if (!all(diag(adjMat) == 0)){
stop("adjMat contains nonzero diagonal element.")
}
}
if (!is.null(nNodes)){
if (class(nNodes) != "numeric" & class(nNodes) != "integer"){
stop("Input (nNodes) is of wrong class")
}
if (length(nNodes) != 1){
stop("Input (nNodes) must be a scalar")
}
if (!.is.int(nNodes)){
stop("Input (nNodes) should be an integer")
}
if (nNodes <= 0){
stop("Input (nNodes) must be strictly positive")
}
}
if (!is.null(zeros)){
if (!is.null(zeros) & as.character(class(zeros)) != "matrix"){
stop("Input (zeros) is of wrong class.")
}
if (!is.null(zeros)){
if(ncol(zeros) != 2){
stop("Wrong dimensions of the (zeros).")
}
}
if (!is.null(zeros)){
zeros <- zeros[order(zeros[,2], zeros[,1]),]
}
}
if (as.character(class(verbose)) != "logical"){
stop("Input (verbose) is of wrong class.")
}
# convert zero pattern into adjacency matrix
if (!is.null(zeros) & !is.null(nNodes) & is.null(adjMat)){
adjMat <- matrix(1, nNodes, nNodes)
adjMat[zeros] <- 0
adjMat[cbind(zeros[,2], zeros[,1])] <- 0
diag(adjMat) <- 0
}
# convert adjacency into graphNel object
G <- igraph::igraph.to.graphNEL(igraph::graph.adjacency(adjMat,
mode="undirected"))
# is graph complete?
is.complete(G)
# check whether a chordal support has been provided
addedEdges <- matrix(nrow=0, ncol=2)
if (!RBGL::is.triangulated(G)){
if(verbose){
cat("-> provided zero pattern not chordal : support is triangulated,", "\n")
}
nEdgesOld <- numEdges(G)
G <- gRbase::triangulate(G)
nEdgesNew <- numEdges(G)
addedEdges <- which(as(G, "graphAM")@adjMat - adjMat == 1,
arr.ind=TRUE)
adjMat <- as(G, "graphAM")@adjMat
diag(adjMat) <- 1
zeros <- which(adjMat == 0, arr.ind=TRUE)
if(verbose){
cat(paste("-> ",
nEdgesNew - nEdgesOld,
" extra nonzeros", sep=""), "\n")
}
}
if (is.null(zeros)){
diag(adjMat) <- 1
zeros <- which(adjMat == 0, arr.ind=TRUE)
}
# decompose in cliques and separators
decomp <- gRbase::rip(G)
Cliques <- decomp$cliques
Separators <- decomp$separators
# convert index vectors from character to integer
for (k in 1:length(Cliques)){
Cliques[[k]] <- as.integer(Cliques[[k]])
}
for (k in 1:length(Separators)){
Separators[[k]] <- as.integer(Separators[[k]])
}
return(list(zeros=zeros,
cliques=Cliques,
separators=Separators,
addedEdges=addedEdges))
}
<bytecode: 0x55fc79c7c3c8>
<environment: namespace:rags2ridges>
--- function search by body ---
Function support4ridgeP in namespace rags2ridges has this body.
----------- END OF FAILURE REPORT --------------
Fatal error: the condition has length > 1
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 2.2.1
Check: installed package size
Result: NOTE
installed size is 5.3Mb
sub-directories of 1Mb or more:
libs 4.1Mb
Flavors: r-devel-linux-x86_64-fedora-clang, r-release-osx-x86_64, r-oldrel-osx-x86_64
Version: 2.2.1
Check: dependencies in R code
Result: NOTE
Namespace in Imports field not imported from: ‘Rcpp’
All declared Imports should be used.
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-patched-solaris-x86, r-release-osx-x86_64, r-oldrel-osx-x86_64