CRAN Package Check Results for Package clusterSim

Last updated on 2019-12-14 03:48:52 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.48-2 13.49 91.90 105.39 ERROR
r-devel-linux-x86_64-debian-gcc 0.48-3 10.64 69.34 79.98 OK
r-devel-linux-x86_64-fedora-clang 0.48-3 122.75 OK
r-devel-linux-x86_64-fedora-gcc 0.48-3 125.73 OK
r-devel-windows-ix86+x86_64 0.48-2 29.00 204.00 233.00 OK
r-devel-windows-ix86+x86_64-gcc8 0.48-2 29.00 208.00 237.00 OK
r-patched-linux-x86_64 0.48-2 10.62 81.34 91.96 OK
r-patched-solaris-x86 0.48-3 157.00 OK
r-release-linux-x86_64 0.48-2 11.88 81.45 93.33 OK
r-release-windows-ix86+x86_64 0.48-2 18.00 138.00 156.00 OK
r-release-osx-x86_64 0.48-2 WARN
r-oldrel-windows-ix86+x86_64 0.48-2 23.00 123.00 146.00 OK
r-oldrel-osx-x86_64 0.48-2 WARN

Check Details

Version: 0.48-2
Check: examples
Result: ERROR
    Running examples in 'clusterSim-Ex.R' failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: speccl
    > ### Title: A spectral clustering algorithm
    > ### Aliases: speccl
    > ### Keywords: spectral clustering cluster analysis scales of measurement
    >
    > ### ** Examples
    >
    > # Commented due to long execution time
    > # Example 1
    > #library(clusterSim)
    > #library(mlbench)
    > #data<-mlbench.spirals(100,1,0.03)
    > #plot(data)
    > #x<-data$x
    > #res1<-speccl(x,nc=2,distance="GDM1",sigma="automatic",
    > #sigma.interval="default",mod.sample=0.75,R=10,iterations=3)
    > #clas1<-res1$cluster
    > #print(data$classes)
    > #print(clas1)
    > #cRand<-classAgreement(table(as.numeric(as.vector(data$classes)),
    > #res1$clusters))$crand
    > #print(res1$sigma)
    > #print(cRand)
    >
    > # Example 2
    > #library(clusterSim)
    > #grnd2<-cluster.Gen(50,model=4,dataType="m",numNoisyVar=1)
    > #data<-as.matrix(grnd2$data)
    > #colornames<-c("red","blue","green")
    > #grnd2$clusters[grnd2$clusters==0]<-length(colornames)
    > #plot(grnd2$data,col=colornames[grnd2$clusters])
    > #us<-nrow(data)*nrow(data)/2
    > #res2<-speccl(data,nc=3,distance="sEuclidean",sigma="automatic",
    > #sigma.interval=us,mod.sample=0.75,R=10,iterations=3)
    > #cRand<-comparing.Partitions(grnd2$clusters,res2$clusters,type="crand")
    > #print(res2$sigma)
    > #print(cRand)
    >
    > # Example 3
    > #library(clusterSim)
    > #grnd3<-cluster.Gen(40,model=4,dataType="o",numCategories=7)
    > #data<-as.matrix(grnd3$data)
    > #plotCategorial(grnd3$data,pairsofVar=NULL,cl=grnd3$clusters,
    > #clColors=c("red","blue","green"))
    > #res3<-speccl(data,nc=3,distance="GDM2",sigma="automatic",
    > #sigma.interval="default",mod.sample=0.75,R=10,iterations=3)
    > #cRand<-comparing.Partitions(grnd3$clusters,res3$clusters,type="crand")
    > #print(res3$sigma)
    > #print(cRand)
    >
    > # Example 4
    > library(clusterSim)
    > data(data_nominal)
    > res4<-speccl(data_nominal,nc=4,distance="SM",sigma="automatic",
    + sigma.interval="default",mod.sample=0.75,R=10,iterations=3)
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    clusterSim
     --- call from context ---
    speccl(data_nominal, nc = 4, distance = "SM", sigma = "automatic",
     sigma.interval = "default", mod.sample = 0.75, R = 10, iterations = 3)
     --- call from argument ---
    if (class(ei) != "try-error") {
     if (!is.null(ei) && is.numeric(ei)) {
     yi <- try(ei/sqrt(rowSums(ei^2)), silent = silDebug)
     if (sum(is.na(yi)) == 0) {
     res <- try(kmeans(yi, yi[initial.Centers(yi, nc),
     ], ...), silent = silDebug)
     if (class(res) == "try-error") {
     res <- list(withinss = 1e+10)
     next
     }
     if (sum(res$withinss) < sigWithinss || sigWithinss ==
     -1) {
     ok <- TRUE
     sig <- sigma
     sigWithinss <- sum(res$withinss)
     }
     }
     i <- i + 1
     }
     else {
     na.action(ei)
     }
    } else {
    }
     --- R stacktrace ---
    where 1: speccl(data_nominal, nc = 4, distance = "SM", sigma = "automatic",
     sigma.interval = "default", mod.sample = 0.75, R = 10, iterations = 3)
    
     --- value of length: 2 type: logical ---
    [1] TRUE TRUE
     --- function from context ---
    function (data, nc, distance = "GDM1", sigma = "automatic", sigma.interval = "default",
     mod.sample = 0.75, R = 10, iterations = 3, na.action = na.omit,
     ...)
    {
     if (sigma == "automatic") {
     sigmaSimulation <- TRUE
     }
     else {
     sigmaSimulation <- FALSE
     sigma <- as.numeric(sigma)
     }
     DEBUG <- FALSE
     globalOk <- FALSE
     silDebug = TRUE
     badSigma <- NULL
     tries <- 0
     while (!globalOk) {
     step <- 0
     sigWithinss <- -1
     ok <- FALSE
     while (!ok && step < 6) {
     step <- step + 1
     x <- data
     bootstrap <- x[sample(1:nrow(x), nrow(x) * mod.sample),
     ]
     levelsPower <- R
     levels <- iterations
     lstart <- 0
     lend <- sum(.ddist(x, distance))
     if (distance == "sEuclidean") {
     lend <- sqrt(lend)
     }
     if (sigma.interval != "default") {
     lend <- sigma.interval
     }
     lby <- lend
     lstartend <- lend
     sig <- sample(1:lstartend, 1)
     if (sigmaSimulation) {
     for (ll in levels:1) {
     lby <- lby/levelsPower
     sigmas <- (seq(lstart, lend - lby, by = lby) +
     seq(lstart + lby, lend, by = lby))/2
     oldsigma <- sig
     i <- 0
     for (sigma in sigmas) {
     if (distance == "GDM1" || distance == "GDM2") {
     ka <- .GDMKernel(as.matrix(dist.GDM(bootstrap,
     method = distance)), sigma)
     }
     else if (distance == "BC") {
     ka <- .GausKernel(as.matrix(dist.BC(bootstrap)),
     sigma)
     }
     else if (distance == "SM") {
     ka <- .GausKernel(as.matrix(dist.SM(bootstrap)),
     sigma)
     }
     else if (distance == "sEuclidean") {
     ka <- .GausKernel(as.matrix(dist(bootstrap))^2,
     sigma)
     }
     else {
     dd <- try(dist(bootstrap, method = distance),
     silent = silDebug)
     if (class(dd) == "try-error") {
     dd <- try(dist.binary(bootstrap, method = distance),
     silent = silDebug)
     }
     if (class(dd) == "try-error") {
     stop(paste("unknown distance method ",
     distance))
     }
     ka <- .GausKernel(as.matrix(dd), sigma)
     }
     d <- 1/sqrt(rowSums(ka))
     l <- d * ka %*% diag(d)
     ei <- NULL
     tf <- function(l, nc) {
     eigen(l, symmetric = TRUE)$vectors[, 1:nc]
     }
     ei <- try(tf(l, nc), silent = silDebug)
     if (class(ei) != "try-error") {
     if (!is.null(ei) && is.numeric(ei)) {
     yi <- try(ei/sqrt(rowSums(ei^2)), silent = silDebug)
     if (sum(is.na(yi)) == 0) {
     res <- try(kmeans(yi, yi[initial.Centers(yi,
     nc), ], ...), silent = silDebug)
     if (class(res) == "try-error") {
     res <- list(withinss = 1e+10)
     next
     }
     if (sum(res$withinss) < sigWithinss ||
     sigWithinss == -1) {
     ok <- TRUE
     sig <- sigma
     sigWithinss <- sum(res$withinss)
     }
     }
     i <- i + 1
     }
     else {
     na.action(ei)
     }
     }
     else {
     }
     }
     if (is.null(sig) || (!is.null(oldsigma) &&
     oldsigma == sig)) {
     lstart <- lstart/R
     lend <- lend/R
     }
     else {
     lstart <- sig - 0.5 * lby
     lend <- sig + 0.5 * lby
     }
     }
     }
     else {
     ok <- TRUE
     sig <- as.numeric(sigma)
     }
     }
     if (step >= 6) {
     sig <- sample(1:lstartend, 1)
     if (distance == "manhattan")
     sig <- sample(1:10, 1)
     }
     if (!is.null(badSigma)) {
     for (ss in badSigma) {
     if (abs(sig - ss) < 0.5) {
     sig <- sample(1:lstartend, 1)
     if (distance == "manhattan")
     sig <- sample(1:10, 1)
     }
     }
     }
     globalOk <- TRUE
     if (distance == "GDM1" || distance == "GDM2") {
     scdist <- dist.GDM(x, method = distance)
     km <- .GDMKernel(as.matrix(scdist), sig)
     }
     else if (distance == "BC") {
     scdist <- dist.BC(x)
     km <- .GausKernel(as.matrix(scdist), sig)
     }
     else if (distance == "SM") {
     scdist <- dist.SM(x)
     km <- .GausKernel(as.matrix(scdist), sig)
     }
     else if (distance == "sEuclidean") {
     scdist <- dist(x)^2
     km <- .GausKernel(as.matrix(scdist), sig)
     }
     else {
     scdist <- try(dist(x, method = distance), silent = silDebug)
     if (class(dd) == "try-error") {
     scdist <- try(dist.binary(x, method = distance),
     silent = silDebug)
     }
     if (class(scdist) == "try-error") {
     stop(paste("unknown distance method ", distance))
     globalOk <- FALSE
     }
     km <- .GausKernel(as.matrix(scdist), sig)
     }
     diag(km) <- 0
     d <- 1/sqrt(rowSums(km))
     l <- d * km %*% diag(d)
     if (getRversion() >= "3.0") {
     ei <- try(eigen(l, symmetric = T)$vectors[, 1:nc],
     silent = silDebug)
     }
     else {
     ei <- try(eigen(l)$vectors[, 1:nc], silent = silDebug)
     }
     if (class(ei) == "try-error") {
     globalOk <- FALSE
     }
     if (globalOk) {
     yi <- ei/sqrt(rowSums(ei^2))
     }
     if (globalOk) {
     res <- try(kmeans(yi, yi[initial.Centers(yi, nc),
     ], ...), silent = silDebug)
     if (class(res) == "try-error") {
     res <- try(kmeans(yi, nc, ...), silent = silDebug)
     }
     }
     if (globalOk && class(res) == "try-error") {
     if (is.character(all.equal(na.action, na.omit))) {
     tries <- tries + 1
     if (tries < 5) {
     stop(paste("Not possible to do clustering, try with other distance type - ",
     distance))
     }
     }
     globalOk <- FALSE
     }
     if (!globalOk) {
     badSigma <- c(badSigma, sig)
     }
     }
     return(list(clusters = res$cluster, size = res$size, withinss = res$withins,
     sigma = sig, Ematrix = ei, Ymatrix = yi, scdist = scdist))
    }
    <bytecode: 0x4b51ee0>
    <environment: namespace:clusterSim>
     --- function search by body ---
    Function speccl in namespace clusterSim has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (class(ei) != "try-error") { : the condition has length > 1
    Calls: speccl
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 0.48-2
Check: whether package can be installed
Result: WARN
    Found the following significant warnings:
     Warning: 'rgl_init' failed, running with rgl.useNULL = TRUE
Flavors: r-release-osx-x86_64, r-oldrel-osx-x86_64

Version: 0.48-2
Check: dependencies in R code
Result: NOTE
    No protocol specified
Flavors: r-release-osx-x86_64, r-oldrel-osx-x86_64

Version: 0.48-2
Check: S3 generic/method consistency
Result: WARN
    No protocol specified
    See section ‘Generic functions and methods’ in the ‘Writing R
    Extensions’ manual.
Flavors: r-release-osx-x86_64, r-oldrel-osx-x86_64

Version: 0.48-2
Check: replacement functions
Result: WARN
    No protocol specified
    The argument of a replacement function which corresponds to the right
    hand side must be named ‘value’.
Flavors: r-release-osx-x86_64, r-oldrel-osx-x86_64

Version: 0.48-2
Check: foreign function calls
Result: NOTE
    No protocol specified
    See chapter ‘System and foreign language interfaces’ in the ‘Writing R
    Extensions’ manual.
Flavors: r-release-osx-x86_64, r-oldrel-osx-x86_64

Version: 0.48-2
Check: R code for possible problems
Result: NOTE
    No protocol specified
Flavors: r-release-osx-x86_64, r-oldrel-osx-x86_64

Version: 0.48-2
Check: for missing documentation entries
Result: WARN
    No protocol specified
    All user-level objects in a package should have documentation entries.
    See chapter ‘Writing R documentation files’ in the ‘Writing R
    Extensions’ manual.
Flavors: r-release-osx-x86_64, r-oldrel-osx-x86_64

Version: 0.48-2
Check: for code/documentation mismatches
Result: WARN
    No protocol specified
    No protocol specified
    No protocol specified
Flavors: r-release-osx-x86_64, r-oldrel-osx-x86_64

Version: 0.48-2
Check: Rd \usage sections
Result: NOTE
    No protocol specified
    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-release-osx-x86_64, r-oldrel-osx-x86_64