CRAN Package Check Results for Package grpss

Last updated on 2020-02-19 10:48:55 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 3.0.1 6.85 58.27 65.12 ERROR
r-devel-linux-x86_64-debian-gcc 3.0.1 6.40 46.66 53.06 ERROR
r-devel-linux-x86_64-fedora-clang 3.0.1 82.53 ERROR
r-devel-linux-x86_64-fedora-gcc 3.0.1 82.50 ERROR
r-devel-windows-ix86+x86_64 3.0.1 14.00 65.00 79.00 OK
r-devel-windows-ix86+x86_64-gcc8 3.0.1 23.00 93.00 116.00 OK
r-patched-linux-x86_64 3.0.1 6.67 52.09 58.76 OK
r-patched-solaris-x86 3.0.1 110.90 OK
r-release-linux-x86_64 3.0.1 6.97 51.71 58.68 OK
r-release-windows-ix86+x86_64 3.0.1 15.00 65.00 80.00 OK
r-release-osx-x86_64 3.0.1 OK
r-oldrel-windows-ix86+x86_64 3.0.1 8.00 60.00 68.00 OK
r-oldrel-osx-x86_64 3.0.1 OK

Check Details

Version: 3.0.1
Check: examples
Result: ERROR
    Running examples in 'grpss-Ex.R' failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: grpss
    > ### Title: Group screening and selection
    > ### Aliases: grpss grpss.default grpss.formula
    >
    > ### ** Examples
    >
    > library(MASS)
    > set.seed(23)
    > n <- 30 # sample size
    > p <- 3 # number of predictors in each group
    > J <- 50 # group size
    > group <- rep(1:J,each = 3) # group indices
    > ##autoregressive correlation
    > Sigma <- 0.6^abs(matrix(1:(p*J),p*J,p*J) - t(matrix(1:(p*J),p*J,p*J)))
    > X <- mvrnorm(n,seq(0,5,length.out = p*J),Sigma)
    > betaTrue <- runif(12,-2,5)
    > mu <- X%*%matrix(c(betaTrue,rep(0,p*J-12)),ncol = 1)
    >
    > # normal distribution
    > y <- mu + rnorm(n)
    >
    > # only conduct screening procedure
    > (gss01 <- grpss(X,y,group)) # gSIS
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    grpss
     --- call from context ---
    grpss.default(X, y, group)
     --- call from argument ---
    if (class(X) != "matrix") {
     tempX <- try(X <- as.matrix(X), silent = TRUE)
     if (class(tempX)[1] == "try-error")
     stop("'X' must be a matrix or can be coerced to a matrix")
    }
     --- R stacktrace ---
    where 1: grpss.default(X, y, group)
    where 2: grpss(X, y, group)
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (X, y, group, threshold = NULL, scale = c("standardize",
     "normalize", "none"), criterion = c("gSIS", "gHOLP", "gAR2",
     "gDC"), family = c("gaussian", "binomial", "poisson"), select = FALSE,
     penalty = c("grSCAD", "grLasso", "grMCP", "gel", "cMCP"),
     cross.validation = FALSE, norm = c("L1", "L2", "Linf"), q = 1,
     perm.seed = 1, nfolds = 10, cv.seed = NULL, parallel = FALSE,
     cl = NULL, cores = NULL, ...)
    {
     if (class(X) != "matrix") {
     tempX <- try(X <- as.matrix(X), silent = TRUE)
     if (class(tempX)[1] == "try-error")
     stop("'X' must be a matrix or can be coerced to a matrix")
     }
     if (!is.numeric(y))
     stop("'y' must be a numeric vector or a matrix")
     if (parallel)
     registerDoParallel(cl = ifelse(is.null(cl), 3, cl), cores)
     type <- match.arg(scale)
     criterion <- match.arg(criterion)
     family <- match.arg(family)
     penalty <- match.arg(penalty)
     norm <- match.arg(norm)
     ok <- complete.cases(X, y)
     if (sum(!ok) > 0)
     warning("Missing values exist and have been removed")
     X <- X[ok, ]
     y <- y[ok]
     if (length(group) != ncol(X))
     stop("length of group must be equal to ncol(X)")
     if (is.null(colnames(X)))
     colnames(X) <- paste0("X", group)
     X0 <- g0 <- NULL
     if (any(group == 0)) {
     grp0 <- group == 0
     X0 <- X[, grp0]
     X <- X[, !grp0]
     g0 <- group[grp0]
     group <- group[!grp0]
     }
     X <- XX <- X[, order(group)]
     group <- sort(as.numeric(as.factor(group)))
     grp.values <- grp.criValues(X, y, group, criterion, family,
     type, norm)
     grp.index <- grp.values[order(grp.values[, 2], decreasing = TRUE),
     ]
     if (is.null(threshold)) {
     set.seed(perm.seed)
     grp.values0 <- grp.criValues(X[sample(nrow(X)), ], y,
     group, criterion, family, type, norm)[, 2]
     set.seed(NULL)
     thres <- grp.index[, 2] > as.numeric(quantile(grp.values0,
     q))
     threshold <- as.integer(sum(thres))
     if (threshold == 0 || threshold == max(group))
     threshold <- as.integer(length(y)/log(length(y)))
     }
     grp.select <- sort(grp.index[1:threshold, 1])
     X <- cbind(X0, XX[, group %in% grp.select])
     if (!select) {
     result <- list(call = match.call(), y = y, X = X, group.screen = c(unique(g0),
     grp.select), threshold = threshold, criterion = criterion)
     class(result) <- "grpss"
     }
     else {
     grp0 <- table(group[group %in% grp.select])
     group <- rep(1:length(grp0), times = grp0)
     if (cross.validation) {
     if (!is.null(cv.seed))
     set.seed(cv.seed)
     grpfit <- cv.grpreg(X, y, group, family = family,
     penalty = penalty, nfolds = nfolds, ...)
     }
     else {
     grpfit <- grpreg(X, y, group, penalty, family, ...)
     }
     result <- c(list(call = match.call(), group.screen = c(g0,
     grp.select), criterion = criterion), grpfit)
     class(result) <- if (cross.validation)
     "cv.grpreg"
     else "grpreg"
     }
     return(result)
    }
    <bytecode: 0x66f6498>
    <environment: namespace:grpss>
     --- function search by body ---
    Function grpss.default in namespace grpss has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (class(X) != "matrix") { : the condition has length > 1
    Calls: grpss -> grpss.default
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 3.0.1
Check: examples
Result: ERROR
    Running examples in ‘grpss-Ex.R’ failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: grpss
    > ### Title: Group screening and selection
    > ### Aliases: grpss grpss.default grpss.formula
    >
    > ### ** Examples
    >
    > library(MASS)
    > set.seed(23)
    > n <- 30 # sample size
    > p <- 3 # number of predictors in each group
    > J <- 50 # group size
    > group <- rep(1:J,each = 3) # group indices
    > ##autoregressive correlation
    > Sigma <- 0.6^abs(matrix(1:(p*J),p*J,p*J) - t(matrix(1:(p*J),p*J,p*J)))
    > X <- mvrnorm(n,seq(0,5,length.out = p*J),Sigma)
    > betaTrue <- runif(12,-2,5)
    > mu <- X%*%matrix(c(betaTrue,rep(0,p*J-12)),ncol = 1)
    >
    > # normal distribution
    > y <- mu + rnorm(n)
    >
    > # only conduct screening procedure
    > (gss01 <- grpss(X,y,group)) # gSIS
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    grpss
     --- call from context ---
    grpss.default(X, y, group)
     --- call from argument ---
    if (class(X) != "matrix") {
     tempX <- try(X <- as.matrix(X), silent = TRUE)
     if (class(tempX)[1] == "try-error")
     stop("'X' must be a matrix or can be coerced to a matrix")
    }
     --- R stacktrace ---
    where 1: grpss.default(X, y, group)
    where 2: grpss(X, y, group)
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (X, y, group, threshold = NULL, scale = c("standardize",
     "normalize", "none"), criterion = c("gSIS", "gHOLP", "gAR2",
     "gDC"), family = c("gaussian", "binomial", "poisson"), select = FALSE,
     penalty = c("grSCAD", "grLasso", "grMCP", "gel", "cMCP"),
     cross.validation = FALSE, norm = c("L1", "L2", "Linf"), q = 1,
     perm.seed = 1, nfolds = 10, cv.seed = NULL, parallel = FALSE,
     cl = NULL, cores = NULL, ...)
    {
     if (class(X) != "matrix") {
     tempX <- try(X <- as.matrix(X), silent = TRUE)
     if (class(tempX)[1] == "try-error")
     stop("'X' must be a matrix or can be coerced to a matrix")
     }
     if (!is.numeric(y))
     stop("'y' must be a numeric vector or a matrix")
     if (parallel)
     registerDoParallel(cl = ifelse(is.null(cl), 3, cl), cores)
     type <- match.arg(scale)
     criterion <- match.arg(criterion)
     family <- match.arg(family)
     penalty <- match.arg(penalty)
     norm <- match.arg(norm)
     ok <- complete.cases(X, y)
     if (sum(!ok) > 0)
     warning("Missing values exist and have been removed")
     X <- X[ok, ]
     y <- y[ok]
     if (length(group) != ncol(X))
     stop("length of group must be equal to ncol(X)")
     if (is.null(colnames(X)))
     colnames(X) <- paste0("X", group)
     X0 <- g0 <- NULL
     if (any(group == 0)) {
     grp0 <- group == 0
     X0 <- X[, grp0]
     X <- X[, !grp0]
     g0 <- group[grp0]
     group <- group[!grp0]
     }
     X <- XX <- X[, order(group)]
     group <- sort(as.numeric(as.factor(group)))
     grp.values <- grp.criValues(X, y, group, criterion, family,
     type, norm)
     grp.index <- grp.values[order(grp.values[, 2], decreasing = TRUE),
     ]
     if (is.null(threshold)) {
     set.seed(perm.seed)
     grp.values0 <- grp.criValues(X[sample(nrow(X)), ], y,
     group, criterion, family, type, norm)[, 2]
     set.seed(NULL)
     thres <- grp.index[, 2] > as.numeric(quantile(grp.values0,
     q))
     threshold <- as.integer(sum(thres))
     if (threshold == 0 || threshold == max(group))
     threshold <- as.integer(length(y)/log(length(y)))
     }
     grp.select <- sort(grp.index[1:threshold, 1])
     X <- cbind(X0, XX[, group %in% grp.select])
     if (!select) {
     result <- list(call = match.call(), y = y, X = X, group.screen = c(unique(g0),
     grp.select), threshold = threshold, criterion = criterion)
     class(result) <- "grpss"
     }
     else {
     grp0 <- table(group[group %in% grp.select])
     group <- rep(1:length(grp0), times = grp0)
     if (cross.validation) {
     if (!is.null(cv.seed))
     set.seed(cv.seed)
     grpfit <- cv.grpreg(X, y, group, family = family,
     penalty = penalty, nfolds = nfolds, ...)
     }
     else {
     grpfit <- grpreg(X, y, group, penalty, family, ...)
     }
     result <- c(list(call = match.call(), group.screen = c(g0,
     grp.select), criterion = criterion), grpfit)
     class(result) <- if (cross.validation)
     "cv.grpreg"
     else "grpreg"
     }
     return(result)
    }
    <bytecode: 0x55c086853010>
    <environment: namespace:grpss>
     --- function search by body ---
    Function grpss.default in namespace grpss has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (class(X) != "matrix") { : the condition has length > 1
    Calls: grpss -> grpss.default
    Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 3.0.1
Check: examples
Result: ERROR
    Running examples in ‘grpss-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: grpss
    > ### Title: Group screening and selection
    > ### Aliases: grpss grpss.default grpss.formula
    >
    > ### ** Examples
    >
    > library(MASS)
    > set.seed(23)
    > n <- 30 # sample size
    > p <- 3 # number of predictors in each group
    > J <- 50 # group size
    > group <- rep(1:J,each = 3) # group indices
    > ##autoregressive correlation
    > Sigma <- 0.6^abs(matrix(1:(p*J),p*J,p*J) - t(matrix(1:(p*J),p*J,p*J)))
    > X <- mvrnorm(n,seq(0,5,length.out = p*J),Sigma)
    > betaTrue <- runif(12,-2,5)
    > mu <- X%*%matrix(c(betaTrue,rep(0,p*J-12)),ncol = 1)
    >
    > # normal distribution
    > y <- mu + rnorm(n)
    >
    > # only conduct screening procedure
    > (gss01 <- grpss(X,y,group)) # gSIS
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    grpss
     --- call from context ---
    grpss.default(X, y, group)
     --- call from argument ---
    if (class(X) != "matrix") {
     tempX <- try(X <- as.matrix(X), silent = TRUE)
     if (class(tempX)[1] == "try-error")
     stop("'X' must be a matrix or can be coerced to a matrix")
    }
     --- R stacktrace ---
    where 1: grpss.default(X, y, group)
    where 2: grpss(X, y, group)
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (X, y, group, threshold = NULL, scale = c("standardize",
     "normalize", "none"), criterion = c("gSIS", "gHOLP", "gAR2",
     "gDC"), family = c("gaussian", "binomial", "poisson"), select = FALSE,
     penalty = c("grSCAD", "grLasso", "grMCP", "gel", "cMCP"),
     cross.validation = FALSE, norm = c("L1", "L2", "Linf"), q = 1,
     perm.seed = 1, nfolds = 10, cv.seed = NULL, parallel = FALSE,
     cl = NULL, cores = NULL, ...)
    {
     if (class(X) != "matrix") {
     tempX <- try(X <- as.matrix(X), silent = TRUE)
     if (class(tempX)[1] == "try-error")
     stop("'X' must be a matrix or can be coerced to a matrix")
     }
     if (!is.numeric(y))
     stop("'y' must be a numeric vector or a matrix")
     if (parallel)
     registerDoParallel(cl = ifelse(is.null(cl), 3, cl), cores)
     type <- match.arg(scale)
     criterion <- match.arg(criterion)
     family <- match.arg(family)
     penalty <- match.arg(penalty)
     norm <- match.arg(norm)
     ok <- complete.cases(X, y)
     if (sum(!ok) > 0)
     warning("Missing values exist and have been removed")
     X <- X[ok, ]
     y <- y[ok]
     if (length(group) != ncol(X))
     stop("length of group must be equal to ncol(X)")
     if (is.null(colnames(X)))
     colnames(X) <- paste0("X", group)
     X0 <- g0 <- NULL
     if (any(group == 0)) {
     grp0 <- group == 0
     X0 <- X[, grp0]
     X <- X[, !grp0]
     g0 <- group[grp0]
     group <- group[!grp0]
     }
     X <- XX <- X[, order(group)]
     group <- sort(as.numeric(as.factor(group)))
     grp.values <- grp.criValues(X, y, group, criterion, family,
     type, norm)
     grp.index <- grp.values[order(grp.values[, 2], decreasing = TRUE),
     ]
     if (is.null(threshold)) {
     set.seed(perm.seed)
     grp.values0 <- grp.criValues(X[sample(nrow(X)), ], y,
     group, criterion, family, type, norm)[, 2]
     set.seed(NULL)
     thres <- grp.index[, 2] > as.numeric(quantile(grp.values0,
     q))
     threshold <- as.integer(sum(thres))
     if (threshold == 0 || threshold == max(group))
     threshold <- as.integer(length(y)/log(length(y)))
     }
     grp.select <- sort(grp.index[1:threshold, 1])
     X <- cbind(X0, XX[, group %in% grp.select])
     if (!select) {
     result <- list(call = match.call(), y = y, X = X, group.screen = c(unique(g0),
     grp.select), threshold = threshold, criterion = criterion)
     class(result) <- "grpss"
     }
     else {
     grp0 <- table(group[group %in% grp.select])
     group <- rep(1:length(grp0), times = grp0)
     if (cross.validation) {
     if (!is.null(cv.seed))
     set.seed(cv.seed)
     grpfit <- cv.grpreg(X, y, group, family = family,
     penalty = penalty, nfolds = nfolds, ...)
     }
     else {
     grpfit <- grpreg(X, y, group, penalty, family, ...)
     }
     result <- c(list(call = match.call(), group.screen = c(g0,
     grp.select), criterion = criterion), grpfit)
     class(result) <- if (cross.validation)
     "cv.grpreg"
     else "grpreg"
     }
     return(result)
    }
    <bytecode: 0x6ce8720>
    <environment: namespace:grpss>
     --- function search by body ---
    Function grpss.default in namespace grpss has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (class(X) != "matrix") { : the condition has length > 1
    Calls: grpss -> grpss.default
    Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang

Version: 3.0.1
Check: examples
Result: ERROR
    Running examples in ‘grpss-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: grpss
    > ### Title: Group screening and selection
    > ### Aliases: grpss grpss.default grpss.formula
    >
    > ### ** Examples
    >
    > library(MASS)
    > set.seed(23)
    > n <- 30 # sample size
    > p <- 3 # number of predictors in each group
    > J <- 50 # group size
    > group <- rep(1:J,each = 3) # group indices
    > ##autoregressive correlation
    > Sigma <- 0.6^abs(matrix(1:(p*J),p*J,p*J) - t(matrix(1:(p*J),p*J,p*J)))
    > X <- mvrnorm(n,seq(0,5,length.out = p*J),Sigma)
    > betaTrue <- runif(12,-2,5)
    > mu <- X%*%matrix(c(betaTrue,rep(0,p*J-12)),ncol = 1)
    >
    > # normal distribution
    > y <- mu + rnorm(n)
    >
    > # only conduct screening procedure
    > (gss01 <- grpss(X,y,group)) # gSIS
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    grpss
     --- call from context ---
    grpss.default(X, y, group)
     --- call from argument ---
    if (class(X) != "matrix") {
     tempX <- try(X <- as.matrix(X), silent = TRUE)
     if (class(tempX)[1] == "try-error")
     stop("'X' must be a matrix or can be coerced to a matrix")
    }
     --- R stacktrace ---
    where 1: grpss.default(X, y, group)
    where 2: grpss(X, y, group)
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (X, y, group, threshold = NULL, scale = c("standardize",
     "normalize", "none"), criterion = c("gSIS", "gHOLP", "gAR2",
     "gDC"), family = c("gaussian", "binomial", "poisson"), select = FALSE,
     penalty = c("grSCAD", "grLasso", "grMCP", "gel", "cMCP"),
     cross.validation = FALSE, norm = c("L1", "L2", "Linf"), q = 1,
     perm.seed = 1, nfolds = 10, cv.seed = NULL, parallel = FALSE,
     cl = NULL, cores = NULL, ...)
    {
     if (class(X) != "matrix") {
     tempX <- try(X <- as.matrix(X), silent = TRUE)
     if (class(tempX)[1] == "try-error")
     stop("'X' must be a matrix or can be coerced to a matrix")
     }
     if (!is.numeric(y))
     stop("'y' must be a numeric vector or a matrix")
     if (parallel)
     registerDoParallel(cl = ifelse(is.null(cl), 3, cl), cores)
     type <- match.arg(scale)
     criterion <- match.arg(criterion)
     family <- match.arg(family)
     penalty <- match.arg(penalty)
     norm <- match.arg(norm)
     ok <- complete.cases(X, y)
     if (sum(!ok) > 0)
     warning("Missing values exist and have been removed")
     X <- X[ok, ]
     y <- y[ok]
     if (length(group) != ncol(X))
     stop("length of group must be equal to ncol(X)")
     if (is.null(colnames(X)))
     colnames(X) <- paste0("X", group)
     X0 <- g0 <- NULL
     if (any(group == 0)) {
     grp0 <- group == 0
     X0 <- X[, grp0]
     X <- X[, !grp0]
     g0 <- group[grp0]
     group <- group[!grp0]
     }
     X <- XX <- X[, order(group)]
     group <- sort(as.numeric(as.factor(group)))
     grp.values <- grp.criValues(X, y, group, criterion, family,
     type, norm)
     grp.index <- grp.values[order(grp.values[, 2], decreasing = TRUE),
     ]
     if (is.null(threshold)) {
     set.seed(perm.seed)
     grp.values0 <- grp.criValues(X[sample(nrow(X)), ], y,
     group, criterion, family, type, norm)[, 2]
     set.seed(NULL)
     thres <- grp.index[, 2] > as.numeric(quantile(grp.values0,
     q))
     threshold <- as.integer(sum(thres))
     if (threshold == 0 || threshold == max(group))
     threshold <- as.integer(length(y)/log(length(y)))
     }
     grp.select <- sort(grp.index[1:threshold, 1])
     X <- cbind(X0, XX[, group %in% grp.select])
     if (!select) {
     result <- list(call = match.call(), y = y, X = X, group.screen = c(unique(g0),
     grp.select), threshold = threshold, criterion = criterion)
     class(result) <- "grpss"
     }
     else {
     grp0 <- table(group[group %in% grp.select])
     group <- rep(1:length(grp0), times = grp0)
     if (cross.validation) {
     if (!is.null(cv.seed))
     set.seed(cv.seed)
     grpfit <- cv.grpreg(X, y, group, family = family,
     penalty = penalty, nfolds = nfolds, ...)
     }
     else {
     grpfit <- grpreg(X, y, group, penalty, family, ...)
     }
     result <- c(list(call = match.call(), group.screen = c(g0,
     grp.select), criterion = criterion), grpfit)
     class(result) <- if (cross.validation)
     "cv.grpreg"
     else "grpreg"
     }
     return(result)
    }
    <bytecode: 0x85ec900>
    <environment: namespace:grpss>
     --- function search by body ---
    Function grpss.default in namespace grpss has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (class(X) != "matrix") { : the condition has length > 1
    Calls: grpss -> grpss.default
    Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc