CRAN Package Check Results for Package SpeciesMix

Last updated on 2020-02-19 10:49:10 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.3.4 10.60 35.64 46.24 ERROR
r-devel-linux-x86_64-debian-gcc 0.3.4 9.43 27.19 36.62 ERROR
r-devel-linux-x86_64-fedora-clang 0.3.4 57.85 ERROR
r-devel-linux-x86_64-fedora-gcc 0.3.4 56.67 ERROR
r-devel-windows-ix86+x86_64 0.3.4 27.00 76.00 103.00 OK
r-devel-windows-ix86+x86_64-gcc8 0.3.4 35.00 107.00 142.00 OK
r-patched-linux-x86_64 0.3.4 9.83 35.50 45.33 OK
r-patched-solaris-x86 0.3.4 85.60 OK
r-release-linux-x86_64 0.3.4 10.65 35.44 46.09 OK
r-release-windows-ix86+x86_64 0.3.4 25.00 69.00 94.00 OK
r-release-osx-x86_64 0.3.4 OK
r-oldrel-windows-ix86+x86_64 0.3.4 22.00 80.00 102.00 OK
r-oldrel-osx-x86_64 0.3.4 OK

Check Details

Version: 0.3.4
Check: examples
Result: ERROR
    Running examples in 'SpeciesMix-Ex.R' failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: SpeciesMix
    > ### Title: Fit finite mixture models to species distributions
    > ### Aliases: SpeciesMix
    > ### Keywords: misc
    >
    > ### ** Examples
    >
    > G <-4
    > S <- 50
    > theta <- matrix(c(-9,35,-32,0,0.7,0,-16,23,-8.2,-3,-0.6,0.8),4,3,byrow=TRUE)
    > dat <- data.frame(y=rep(1,200),x=runif(200,0,2.5),z=rnorm(200,10,2))
    > dat <- data.frame(dat,x.sq=dat$x^2)
    > dat1 <- artificial.data(y~1+x+x.sq,dat,theta,S)
    > fm4 <- SpeciesMix(obs~1+x+x.sq,dat1$pa,dat,G=4,em.prefit=TRUE,em.refit=1,est.var=TRUE)
    Fitting Group 4
    Iteration | LogL
    1 | -6009.394
    2 | -4540.395
    3 | -4433.871
    initial value 4433.871314
    iter 10 value 3959.166846
    iter 20 value 3832.497287
    final value 3795.236914
    converged
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    SpeciesMix
     --- call from context ---
    SpeciesMix.bernoulli(sp.form, sp.data, covar.data, G, pars, em.prefit,
     em.steps, em.refit, est.var, residuals, trace, r1 = FALSE)
     --- call from argument ---
    if (class(fmM.out$covar) != "try-error") {
     tmp <- sqrt(diag(fmM.out$covar))
     tmp <- tmp[(G):length(tmp)]
     fmM.out$se <- matrix(tmp, G, ncol(fmM.out$coef))
     colnames(fmM.out$se) <- colnames(fmM.out$coef)
     rownames(fmM.out$se) <- rownames(fmM.out$coef)
    }
     --- R stacktrace ---
    where 1: SpeciesMix.bernoulli(sp.form, sp.data, covar.data, G, pars, em.prefit,
     em.steps, em.refit, est.var, residuals, trace, r1 = FALSE)
    where 2: SpeciesMix(obs ~ 1 + x + x.sq, dat1$pa, dat, G = 4, em.prefit = TRUE,
     em.refit = 1, est.var = TRUE)
    
     --- value of length: 2 type: logical ---
    [1] TRUE TRUE
     --- function from context ---
    function (sp.form, sp.data, covar.data, G = 2, pars = NA, em.prefit = TRUE,
     em.steps = 4, em.refit = 1, est.var = FALSE, residuals = FALSE,
     trace = TRUE, r1 = FALSE)
    {
     t.covar.data <- covar.data
     t.sp.data <- sp.data
     sp.form <- update.formula(sp.form, obs ~ 1 + .)
     if (em.prefit | G == 1) {
     prefit <- SpeciesMix.em(sp.form, sp.data, covar.data,
     G, ite.max = em.steps, em.refit = em.refit, r1)
     pars <- c(additive.logistic(prefit$pi, T)[1:(G - 1)],
     unlist(prefit$coef))
     }
     S <- dim(sp.data)[2]
     if (is.null(colnames(sp.data))) {
     sp.name <- 1:S
     }
     else {
     sp.name <- colnames(sp.data)
     }
     n <- dim(sp.data)[1]
     sp <- rep(sp.name, each = n)
     if (G == 1)
     return(prefit)
     var.names <- colnames(covar.data)
     covar.data <- data.frame(kronecker(rep(1, S), as.matrix(covar.data)))
     names(covar.data) <- var.names
     sp.data <- as.data.frame(sp.data)
     data <- data.frame(obs = as.numeric(unlist(sp.data)), covar.data)
     names(data)[1] <- as.character(sp.form)[2]
     fmM.out <- fitmix.cpp(sp.form, data, sp, G, pars = pars,
     calc.hes = est.var, r1)
     while (fmM.out$logl == 0) {
     prefit <- SpeciesMix.em(sp.form, t.sp.data, t.covar.data,
     G, ite.max = em.steps, em.refit = 1, r1)
     pars <- c(additive.logistic(prefit$pi, T)[1:(G - 1)],
     unlist(prefit$coef))
     fmM.out <- fitmix.cpp(sp.form, data, sp, G, pars = pars,
     calc.hes = est.var, r1)
     }
     rownames(fmM.out$tau) <- sp.name
     fmM.out$se <- NA
     if (est.var) {
     fmM.out$covar <- try(solve(fmM.out$hessian))
     if (class(fmM.out$covar) != "try-error") {
     tmp <- sqrt(diag(fmM.out$covar))
     tmp <- tmp[(G):length(tmp)]
     fmM.out$se <- matrix(tmp, G, ncol(fmM.out$coef))
     colnames(fmM.out$se) <- colnames(fmM.out$coef)
     rownames(fmM.out$se) <- rownames(fmM.out$coef)
     }
     }
     if (residuals)
     fmM.out$residuals <- mix.residuals(fmM.out, sp.form,
     data, sp)
     fmM.out$formula <- sp.form
     class(fmM.out) <- c("archetype", "bernoulli")
     fmM.out
    }
    <bytecode: 0x2d664f0>
    <environment: namespace:SpeciesMix>
     --- function search by body ---
    Function SpeciesMix.bernoulli in namespace SpeciesMix has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (class(fmM.out$covar) != "try-error") { :
     the condition has length > 1
    Calls: SpeciesMix -> SpeciesMix.bernoulli
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 0.3.4
Check: examples
Result: ERROR
    Running examples in ‘SpeciesMix-Ex.R’ failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: SpeciesMix
    > ### Title: Fit finite mixture models to species distributions
    > ### Aliases: SpeciesMix
    > ### Keywords: misc
    >
    > ### ** Examples
    >
    > G <-4
    > S <- 50
    > theta <- matrix(c(-9,35,-32,0,0.7,0,-16,23,-8.2,-3,-0.6,0.8),4,3,byrow=TRUE)
    > dat <- data.frame(y=rep(1,200),x=runif(200,0,2.5),z=rnorm(200,10,2))
    > dat <- data.frame(dat,x.sq=dat$x^2)
    > dat1 <- artificial.data(y~1+x+x.sq,dat,theta,S)
    > fm4 <- SpeciesMix(obs~1+x+x.sq,dat1$pa,dat,G=4,em.prefit=TRUE,em.refit=1,est.var=TRUE)
    Fitting Group 4
    Iteration | LogL
    1 | -6009.394
    2 | -4540.395
    3 | -4433.871
    initial value 4433.871314
    iter 10 value 3958.782816
    iter 20 value 3827.504738
    final value 3795.236915
    converged
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    SpeciesMix
     --- call from context ---
    SpeciesMix.bernoulli(sp.form, sp.data, covar.data, G, pars, em.prefit,
     em.steps, em.refit, est.var, residuals, trace, r1 = FALSE)
     --- call from argument ---
    if (class(fmM.out$covar) != "try-error") {
     tmp <- sqrt(diag(fmM.out$covar))
     tmp <- tmp[(G):length(tmp)]
     fmM.out$se <- matrix(tmp, G, ncol(fmM.out$coef))
     colnames(fmM.out$se) <- colnames(fmM.out$coef)
     rownames(fmM.out$se) <- rownames(fmM.out$coef)
    }
     --- R stacktrace ---
    where 1: SpeciesMix.bernoulli(sp.form, sp.data, covar.data, G, pars, em.prefit,
     em.steps, em.refit, est.var, residuals, trace, r1 = FALSE)
    where 2: SpeciesMix(obs ~ 1 + x + x.sq, dat1$pa, dat, G = 4, em.prefit = TRUE,
     em.refit = 1, est.var = TRUE)
    
     --- value of length: 2 type: logical ---
    [1] TRUE TRUE
     --- function from context ---
    function (sp.form, sp.data, covar.data, G = 2, pars = NA, em.prefit = TRUE,
     em.steps = 4, em.refit = 1, est.var = FALSE, residuals = FALSE,
     trace = TRUE, r1 = FALSE)
    {
     t.covar.data <- covar.data
     t.sp.data <- sp.data
     sp.form <- update.formula(sp.form, obs ~ 1 + .)
     if (em.prefit | G == 1) {
     prefit <- SpeciesMix.em(sp.form, sp.data, covar.data,
     G, ite.max = em.steps, em.refit = em.refit, r1)
     pars <- c(additive.logistic(prefit$pi, T)[1:(G - 1)],
     unlist(prefit$coef))
     }
     S <- dim(sp.data)[2]
     if (is.null(colnames(sp.data))) {
     sp.name <- 1:S
     }
     else {
     sp.name <- colnames(sp.data)
     }
     n <- dim(sp.data)[1]
     sp <- rep(sp.name, each = n)
     if (G == 1)
     return(prefit)
     var.names <- colnames(covar.data)
     covar.data <- data.frame(kronecker(rep(1, S), as.matrix(covar.data)))
     names(covar.data) <- var.names
     sp.data <- as.data.frame(sp.data)
     data <- data.frame(obs = as.numeric(unlist(sp.data)), covar.data)
     names(data)[1] <- as.character(sp.form)[2]
     fmM.out <- fitmix.cpp(sp.form, data, sp, G, pars = pars,
     calc.hes = est.var, r1)
     while (fmM.out$logl == 0) {
     prefit <- SpeciesMix.em(sp.form, t.sp.data, t.covar.data,
     G, ite.max = em.steps, em.refit = 1, r1)
     pars <- c(additive.logistic(prefit$pi, T)[1:(G - 1)],
     unlist(prefit$coef))
     fmM.out <- fitmix.cpp(sp.form, data, sp, G, pars = pars,
     calc.hes = est.var, r1)
     }
     rownames(fmM.out$tau) <- sp.name
     fmM.out$se <- NA
     if (est.var) {
     fmM.out$covar <- try(solve(fmM.out$hessian))
     if (class(fmM.out$covar) != "try-error") {
     tmp <- sqrt(diag(fmM.out$covar))
     tmp <- tmp[(G):length(tmp)]
     fmM.out$se <- matrix(tmp, G, ncol(fmM.out$coef))
     colnames(fmM.out$se) <- colnames(fmM.out$coef)
     rownames(fmM.out$se) <- rownames(fmM.out$coef)
     }
     }
     if (residuals)
     fmM.out$residuals <- mix.residuals(fmM.out, sp.form,
     data, sp)
     fmM.out$formula <- sp.form
     class(fmM.out) <- c("archetype", "bernoulli")
     fmM.out
    }
    <bytecode: 0x558de29b9288>
    <environment: namespace:SpeciesMix>
     --- function search by body ---
    Function SpeciesMix.bernoulli in namespace SpeciesMix has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (class(fmM.out$covar) != "try-error") { :
     the condition has length > 1
    Calls: SpeciesMix -> SpeciesMix.bernoulli
    Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 0.3.4
Check: compiled code
Result: NOTE
    File ‘SpeciesMix/libs/SpeciesMix.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-fedora-clang, r-devel-linux-x86_64-fedora-gcc

Version: 0.3.4
Check: examples
Result: ERROR
    Running examples in ‘SpeciesMix-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: SpeciesMix
    > ### Title: Fit finite mixture models to species distributions
    > ### Aliases: SpeciesMix
    > ### Keywords: misc
    >
    > ### ** Examples
    >
    > G <-4
    > S <- 50
    > theta <- matrix(c(-9,35,-32,0,0.7,0,-16,23,-8.2,-3,-0.6,0.8),4,3,byrow=TRUE)
    > dat <- data.frame(y=rep(1,200),x=runif(200,0,2.5),z=rnorm(200,10,2))
    > dat <- data.frame(dat,x.sq=dat$x^2)
    > dat1 <- artificial.data(y~1+x+x.sq,dat,theta,S)
    > fm4 <- SpeciesMix(obs~1+x+x.sq,dat1$pa,dat,G=4,em.prefit=TRUE,em.refit=1,est.var=TRUE)
    Fitting Group 4
    Iteration | LogL
    1 | -6009.394
    2 | -4540.395
    3 | -4433.871
    initial value 4433.871314
    iter 10 value 3959.166846
    iter 20 value 3832.497287
    final value 3795.236914
    converged
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    SpeciesMix
     --- call from context ---
    SpeciesMix.bernoulli(sp.form, sp.data, covar.data, G, pars, em.prefit,
     em.steps, em.refit, est.var, residuals, trace, r1 = FALSE)
     --- call from argument ---
    if (class(fmM.out$covar) != "try-error") {
     tmp <- sqrt(diag(fmM.out$covar))
     tmp <- tmp[(G):length(tmp)]
     fmM.out$se <- matrix(tmp, G, ncol(fmM.out$coef))
     colnames(fmM.out$se) <- colnames(fmM.out$coef)
     rownames(fmM.out$se) <- rownames(fmM.out$coef)
    }
     --- R stacktrace ---
    where 1: SpeciesMix.bernoulli(sp.form, sp.data, covar.data, G, pars, em.prefit,
     em.steps, em.refit, est.var, residuals, trace, r1 = FALSE)
    where 2: SpeciesMix(obs ~ 1 + x + x.sq, dat1$pa, dat, G = 4, em.prefit = TRUE,
     em.refit = 1, est.var = TRUE)
    
     --- value of length: 2 type: logical ---
    [1] TRUE TRUE
     --- function from context ---
    function (sp.form, sp.data, covar.data, G = 2, pars = NA, em.prefit = TRUE,
     em.steps = 4, em.refit = 1, est.var = FALSE, residuals = FALSE,
     trace = TRUE, r1 = FALSE)
    {
     t.covar.data <- covar.data
     t.sp.data <- sp.data
     sp.form <- update.formula(sp.form, obs ~ 1 + .)
     if (em.prefit | G == 1) {
     prefit <- SpeciesMix.em(sp.form, sp.data, covar.data,
     G, ite.max = em.steps, em.refit = em.refit, r1)
     pars <- c(additive.logistic(prefit$pi, T)[1:(G - 1)],
     unlist(prefit$coef))
     }
     S <- dim(sp.data)[2]
     if (is.null(colnames(sp.data))) {
     sp.name <- 1:S
     }
     else {
     sp.name <- colnames(sp.data)
     }
     n <- dim(sp.data)[1]
     sp <- rep(sp.name, each = n)
     if (G == 1)
     return(prefit)
     var.names <- colnames(covar.data)
     covar.data <- data.frame(kronecker(rep(1, S), as.matrix(covar.data)))
     names(covar.data) <- var.names
     sp.data <- as.data.frame(sp.data)
     data <- data.frame(obs = as.numeric(unlist(sp.data)), covar.data)
     names(data)[1] <- as.character(sp.form)[2]
     fmM.out <- fitmix.cpp(sp.form, data, sp, G, pars = pars,
     calc.hes = est.var, r1)
     while (fmM.out$logl == 0) {
     prefit <- SpeciesMix.em(sp.form, t.sp.data, t.covar.data,
     G, ite.max = em.steps, em.refit = 1, r1)
     pars <- c(additive.logistic(prefit$pi, T)[1:(G - 1)],
     unlist(prefit$coef))
     fmM.out <- fitmix.cpp(sp.form, data, sp, G, pars = pars,
     calc.hes = est.var, r1)
     }
     rownames(fmM.out$tau) <- sp.name
     fmM.out$se <- NA
     if (est.var) {
     fmM.out$covar <- try(solve(fmM.out$hessian))
     if (class(fmM.out$covar) != "try-error") {
     tmp <- sqrt(diag(fmM.out$covar))
     tmp <- tmp[(G):length(tmp)]
     fmM.out$se <- matrix(tmp, G, ncol(fmM.out$coef))
     colnames(fmM.out$se) <- colnames(fmM.out$coef)
     rownames(fmM.out$se) <- rownames(fmM.out$coef)
     }
     }
     if (residuals)
     fmM.out$residuals <- mix.residuals(fmM.out, sp.form,
     data, sp)
     fmM.out$formula <- sp.form
     class(fmM.out) <- c("archetype", "bernoulli")
     fmM.out
    }
    <bytecode: 0x3c012b8>
    <environment: namespace:SpeciesMix>
     --- function search by body ---
    Function SpeciesMix.bernoulli in namespace SpeciesMix has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (class(fmM.out$covar) != "try-error") { :
     the condition has length > 1
    Calls: SpeciesMix -> SpeciesMix.bernoulli
    Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang

Version: 0.3.4
Check: examples
Result: ERROR
    Running examples in ‘SpeciesMix-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: SpeciesMix
    > ### Title: Fit finite mixture models to species distributions
    > ### Aliases: SpeciesMix
    > ### Keywords: misc
    >
    > ### ** Examples
    >
    > G <-4
    > S <- 50
    > theta <- matrix(c(-9,35,-32,0,0.7,0,-16,23,-8.2,-3,-0.6,0.8),4,3,byrow=TRUE)
    > dat <- data.frame(y=rep(1,200),x=runif(200,0,2.5),z=rnorm(200,10,2))
    > dat <- data.frame(dat,x.sq=dat$x^2)
    > dat1 <- artificial.data(y~1+x+x.sq,dat,theta,S)
    > fm4 <- SpeciesMix(obs~1+x+x.sq,dat1$pa,dat,G=4,em.prefit=TRUE,em.refit=1,est.var=TRUE)
    Fitting Group 4
    Iteration | LogL
    1 | -6009.394
    2 | -4540.395
    3 | -4433.871
    initial value 4433.871314
    iter 10 value 3959.166846
    iter 20 value 3832.497287
    final value 3795.236914
    converged
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    SpeciesMix
     --- call from context ---
    SpeciesMix.bernoulli(sp.form, sp.data, covar.data, G, pars, em.prefit,
     em.steps, em.refit, est.var, residuals, trace, r1 = FALSE)
     --- call from argument ---
    if (class(fmM.out$covar) != "try-error") {
     tmp <- sqrt(diag(fmM.out$covar))
     tmp <- tmp[(G):length(tmp)]
     fmM.out$se <- matrix(tmp, G, ncol(fmM.out$coef))
     colnames(fmM.out$se) <- colnames(fmM.out$coef)
     rownames(fmM.out$se) <- rownames(fmM.out$coef)
    }
     --- R stacktrace ---
    where 1: SpeciesMix.bernoulli(sp.form, sp.data, covar.data, G, pars, em.prefit,
     em.steps, em.refit, est.var, residuals, trace, r1 = FALSE)
    where 2: SpeciesMix(obs ~ 1 + x + x.sq, dat1$pa, dat, G = 4, em.prefit = TRUE,
     em.refit = 1, est.var = TRUE)
    
     --- value of length: 2 type: logical ---
    [1] TRUE TRUE
     --- function from context ---
    function (sp.form, sp.data, covar.data, G = 2, pars = NA, em.prefit = TRUE,
     em.steps = 4, em.refit = 1, est.var = FALSE, residuals = FALSE,
     trace = TRUE, r1 = FALSE)
    {
     t.covar.data <- covar.data
     t.sp.data <- sp.data
     sp.form <- update.formula(sp.form, obs ~ 1 + .)
     if (em.prefit | G == 1) {
     prefit <- SpeciesMix.em(sp.form, sp.data, covar.data,
     G, ite.max = em.steps, em.refit = em.refit, r1)
     pars <- c(additive.logistic(prefit$pi, T)[1:(G - 1)],
     unlist(prefit$coef))
     }
     S <- dim(sp.data)[2]
     if (is.null(colnames(sp.data))) {
     sp.name <- 1:S
     }
     else {
     sp.name <- colnames(sp.data)
     }
     n <- dim(sp.data)[1]
     sp <- rep(sp.name, each = n)
     if (G == 1)
     return(prefit)
     var.names <- colnames(covar.data)
     covar.data <- data.frame(kronecker(rep(1, S), as.matrix(covar.data)))
     names(covar.data) <- var.names
     sp.data <- as.data.frame(sp.data)
     data <- data.frame(obs = as.numeric(unlist(sp.data)), covar.data)
     names(data)[1] <- as.character(sp.form)[2]
     fmM.out <- fitmix.cpp(sp.form, data, sp, G, pars = pars,
     calc.hes = est.var, r1)
     while (fmM.out$logl == 0) {
     prefit <- SpeciesMix.em(sp.form, t.sp.data, t.covar.data,
     G, ite.max = em.steps, em.refit = 1, r1)
     pars <- c(additive.logistic(prefit$pi, T)[1:(G - 1)],
     unlist(prefit$coef))
     fmM.out <- fitmix.cpp(sp.form, data, sp, G, pars = pars,
     calc.hes = est.var, r1)
     }
     rownames(fmM.out$tau) <- sp.name
     fmM.out$se <- NA
     if (est.var) {
     fmM.out$covar <- try(solve(fmM.out$hessian))
     if (class(fmM.out$covar) != "try-error") {
     tmp <- sqrt(diag(fmM.out$covar))
     tmp <- tmp[(G):length(tmp)]
     fmM.out$se <- matrix(tmp, G, ncol(fmM.out$coef))
     colnames(fmM.out$se) <- colnames(fmM.out$coef)
     rownames(fmM.out$se) <- rownames(fmM.out$coef)
     }
     }
     if (residuals)
     fmM.out$residuals <- mix.residuals(fmM.out, sp.form,
     data, sp)
     fmM.out$formula <- sp.form
     class(fmM.out) <- c("archetype", "bernoulli")
     fmM.out
    }
    <bytecode: 0x3a45580>
    <environment: namespace:SpeciesMix>
     --- function search by body ---
    Function SpeciesMix.bernoulli in namespace SpeciesMix has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (class(fmM.out$covar) != "try-error") { :
     the condition has length > 1
    Calls: SpeciesMix -> SpeciesMix.bernoulli
    Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc