CRAN Package Check Results for Package prospectr

Last updated on 2020-02-27 17:51:05 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.1.3 68.11 43.42 111.53 ERROR
r-devel-linux-x86_64-debian-gcc 0.1.3 45.69 34.42 80.11 ERROR
r-devel-linux-x86_64-fedora-clang 0.1.3 150.77 ERROR
r-devel-linux-x86_64-fedora-gcc 0.1.3 143.47 ERROR
r-devel-windows-ix86+x86_64 0.1.3 128.00 147.00 275.00 NOTE
r-devel-windows-ix86+x86_64-gcc8 0.1.3 142.00 150.00 292.00 NOTE
r-patched-linux-x86_64 0.1.3 55.52 85.04 140.56 NOTE
r-patched-solaris-x86 0.1.3 277.00 NOTE
r-release-linux-x86_64 0.1.3 54.17 83.44 137.61 NOTE
r-release-windows-ix86+x86_64 0.1.3 128.00 140.00 268.00 NOTE
r-release-osx-x86_64 0.1.3 NOTE
r-oldrel-windows-ix86+x86_64 0.1.3 96.00 134.00 230.00 NOTE
r-oldrel-osx-x86_64 0.1.3 NOTE

Check Details

Version: 0.1.3
Check: DESCRIPTION meta-information
Result: NOTE
    Malformed Description field: should contain one or more complete sentences.
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-devel-windows-ix86+x86_64-gcc8, 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.1.3
Check: R code for possible problems
Result: NOTE
    Cul: no visible global function definition for 'qf'
    blockScale: no visible binding for global variable 'sd'
    cochranTest: no visible global function definition for 'prcomp'
    cochranTest: no visible binding for global variable 'var'
    cochranTest: no visible global function definition for 'matplot'
    cochranTest: no visible global function definition for 'legend'
    continuumRemoval : crfun: no visible global function definition for
     'chull'
    continuumRemoval : crfun: no visible global function definition for
     'approx'
    continuumRemoval : crfun: no visible global function definition for
     'splinefun'
    detrend: no visible binding for global variable 'sd'
    duplex: no visible global function definition for 'prcomp'
    e2m: no visible global function definition for 'cov'
    kenStone: no visible global function definition for 'prcomp'
    naes: no visible global function definition for 'prcomp'
    naes: no visible global function definition for 'kmeans'
    puchwein: no visible global function definition for 'prcomp'
    readASD: no visible global function definition for 'read.table'
    resample : resfun: no visible global function definition for 'approx'
    resample : resfun: no visible global function definition for
     'splinefun'
    shenkWest: no visible global function definition for 'prcomp'
    spliceCorrection : extrapfun: no visible global function definition for
     'lm'
    standardNormalVariate: no visible binding for global variable 'sd'
    Undefined global functions or variables:
     approx chull cov kmeans legend lm matplot prcomp qf read.table sd
     splinefun var
    Consider adding
     importFrom("grDevices", "chull")
     importFrom("graphics", "legend", "matplot")
     importFrom("stats", "approx", "cov", "kmeans", "lm", "prcomp", "qf",
     "sd", "splinefun", "var")
     importFrom("utils", "read.table")
    to your NAMESPACE file.
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-devel-windows-ix86+x86_64-gcc8, 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.1.3
Check: examples
Result: ERROR
    Running examples in 'prospectr-Ex.R' failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: blockNorm
    > ### Title: Sum of squares block weighting
    > ### Aliases: blockNorm
    >
    > ### ** Examples
    >
    > X <- matrix(rnorm(100),ncol=10)
    > # Block normalize to sum of square = 1
    > res <- blockNorm(X,1)
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    prospectr
     --- call from context ---
    blockNorm(X, 1)
     --- call from argument ---
    if (!class(X) %in% c("matrix", "data.frame")) stop("X should be a matrix or data.frame")
     --- R stacktrace ---
    where 1: blockNorm(X, 1)
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (X, targetnorm = 1)
    {
     if (!class(X) %in% c("matrix", "data.frame"))
     stop("X should be a matrix or data.frame")
     if (is.data.frame(X))
     X <- as.matrix(X)
     if (targetnorm == 1) {
     f <- sum(X^2, na.rm = T)^0.5
     }
     else {
     fmax <- sum(X^2, na.rm = T)
     fmaxn <- sum((X/fmax)^2, na.rm = T)
     if (fmaxn > targetnorm) {
     fmin <- fmax
     fminn <- fmaxn
     while (fminn > targetnorm) {
     fmin <- fmin * 10
     fminn <- sum((X/fmin)^2, na.rm = T)
     }
     }
     else {
     fmin <- fmax
     fminn <- fmaxn
     while (fmaxn < targetnorm) {
     fmax <- fmax/10
     fmaxn <- sum((X/fmax)^2, na.rm = T)
     }
     }
     n <- fmaxn
     while ((targetnorm - n)^2 > 1e-12) {
     f <- (fmin + fmax)/2
     n <- sum((X/f)^2, na.rm = T)
     if (n > targetnorm)
     fmax <- f
     else fmin <- f
     }
     }
     Xn <- X/f
     list(Xscaled = Xn, f = f)
    }
    <bytecode: 0x3ba01a0>
    <environment: namespace:prospectr>
     --- function search by body ---
    Function blockNorm in namespace prospectr has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (!class(X) %in% c("matrix", "data.frame")) stop("X should be a matrix or data.frame") :
     the condition has length > 1
    Calls: blockNorm
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 0.1.3
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
     ...
    --- re-building 'prospectr-intro.Rnw' using knitr
    Loading required package: RcppArmadillo
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    prospectr
     --- call from context ---
    standardNormalVariate(X = NIRsoil$spc)
     --- call from argument ---
    if (!class(X) %in% c("matrix", "data.frame")) stop("X should be a matrix or data.frame")
     --- R stacktrace ---
    where 1: standardNormalVariate(X = NIRsoil$spc)
    where 2: eval(expr, envir, enclos)
    where 3: eval(expr, envir, enclos)
    where 4: withVisible(eval(expr, envir, enclos))
    where 5: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler,
     error = eHandler, message = mHandler)
    where 6: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir,
     enclos)), warning = wHandler, error = eHandler, message = mHandler))
    where 7: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr,
     envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
    where 8: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos,
     debug = debug, last = i == length(out), use_try = stop_on_error !=
     2L, keep_warning = keep_warning, keep_message = keep_message,
     output_handler = output_handler, include_timing = include_timing)
    where 9: evaluate::evaluate(...)
    where 10: evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning),
     keep_message = !isFALSE(options$message), stop_on_error = if (options$error &&
     options$include) 0L else 2L, output_handler = knit_handlers(options$render,
     options))
    where 11: in_dir(input_dir(), evaluate(code, envir = env, new_device = FALSE,
     keep_warning = !isFALSE(options$warning), keep_message = !isFALSE(options$message),
     stop_on_error = if (options$error && options$include) 0L else 2L,
     output_handler = knit_handlers(options$render, options)))
    where 12: block_exec(params)
    where 13: call_block(x)
    where 14: process_group.block(group)
    where 15: process_group(group)
    where 16: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),
     error = function(e) {
     setwd(wd)
     cat(res, sep = "\n", file = output %n% "")
     message("Quitting from lines ", paste(current_lines(i),
     collapse = "-"), " (", knit_concord$get("infile"),
     ") ")
     })
    where 17: process_file(text, output)
    where 18: (if (grepl("\\.[Rr]md$", file)) knit2html_v1 else if (grepl("\\.[Rr]rst$",
     file)) knit2pandoc else knit)(file, encoding = encoding,
     quiet = quiet, envir = globalenv(), ...)
    where 19: engine$weave(file, quiet = quiet, encoding = enc)
    where 20: doTryCatch(return(expr), name, parentenv, handler)
    where 21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 22: tryCatchList(expr, classes, parentenv, handlers)
    where 23: tryCatch({
     engine$weave(file, quiet = quiet, encoding = enc)
     setwd(startdir)
     output <- find_vignette_product(name, by = "weave", engine = engine)
     if (!have.makefile && vignette_is_tex(output)) {
     texi2pdf(file = output, clean = FALSE, quiet = quiet)
     output <- find_vignette_product(name, by = "texi2pdf",
     engine = engine)
     }
     outputs <- c(outputs, output)
    }, error = function(e) {
     thisOK <<- FALSE
     fails <<- c(fails, file)
     message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s",
     file, conditionMessage(e)))
    })
    where 24: tools:::buildVignettes(dir = "/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/prospectr.Rcheck/vign_test/prospectr",
     ser_elibs = "/tmp/RtmpcRhI6X/file28d11b007ff.rds")
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (X)
    {
     if (!class(X) %in% c("matrix", "data.frame"))
     stop("X should be a matrix or data.frame")
     X <- sweep(X, 1, rowMeans(X, na.rm = T), "-")
     X <- sweep(X, 1, apply(X, 1, sd, na.rm = T), "/")
     return(X)
    }
    <bytecode: 0x539cb00>
    <environment: namespace:prospectr>
     --- function search by body ---
    Function standardNormalVariate in namespace prospectr has this body.
     ----------- END OF FAILURE REPORT --------------
    Quitting from lines 250-251 (prospectr-intro.Rnw)
    Error: processing vignette 'prospectr-intro.Rnw' failed with diagnostics:
    the condition has length > 1
    --- failed re-building 'prospectr-intro.Rnw'
    
    SUMMARY: processing the following file failed:
     'prospectr-intro.Rnw'
    
    Error: Vignette re-building failed.
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 0.1.3
Check: examples
Result: ERROR
    Running examples in ‘prospectr-Ex.R’ failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: blockNorm
    > ### Title: Sum of squares block weighting
    > ### Aliases: blockNorm
    >
    > ### ** Examples
    >
    > X <- matrix(rnorm(100),ncol=10)
    > # Block normalize to sum of square = 1
    > res <- blockNorm(X,1)
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    prospectr
     --- call from context ---
    blockNorm(X, 1)
     --- call from argument ---
    if (!class(X) %in% c("matrix", "data.frame")) stop("X should be a matrix or data.frame")
     --- R stacktrace ---
    where 1: blockNorm(X, 1)
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (X, targetnorm = 1)
    {
     if (!class(X) %in% c("matrix", "data.frame"))
     stop("X should be a matrix or data.frame")
     if (is.data.frame(X))
     X <- as.matrix(X)
     if (targetnorm == 1) {
     f <- sum(X^2, na.rm = T)^0.5
     }
     else {
     fmax <- sum(X^2, na.rm = T)
     fmaxn <- sum((X/fmax)^2, na.rm = T)
     if (fmaxn > targetnorm) {
     fmin <- fmax
     fminn <- fmaxn
     while (fminn > targetnorm) {
     fmin <- fmin * 10
     fminn <- sum((X/fmin)^2, na.rm = T)
     }
     }
     else {
     fmin <- fmax
     fminn <- fmaxn
     while (fmaxn < targetnorm) {
     fmax <- fmax/10
     fmaxn <- sum((X/fmax)^2, na.rm = T)
     }
     }
     n <- fmaxn
     while ((targetnorm - n)^2 > 1e-12) {
     f <- (fmin + fmax)/2
     n <- sum((X/f)^2, na.rm = T)
     if (n > targetnorm)
     fmax <- f
     else fmin <- f
     }
     }
     Xn <- X/f
     list(Xscaled = Xn, f = f)
    }
    <bytecode: 0x556ad70f1460>
    <environment: namespace:prospectr>
     --- function search by body ---
    Function blockNorm in namespace prospectr has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (!class(X) %in% c("matrix", "data.frame")) stop("X should be a matrix or data.frame") :
     the condition has length > 1
    Calls: blockNorm
    Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 0.1.3
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
     ...
    --- re-building ‘prospectr-intro.Rnw’ using knitr
    Loading required package: RcppArmadillo
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    prospectr
     --- call from context ---
    standardNormalVariate(X = NIRsoil$spc)
     --- call from argument ---
    if (!class(X) %in% c("matrix", "data.frame")) stop("X should be a matrix or data.frame")
     --- R stacktrace ---
    where 1: standardNormalVariate(X = NIRsoil$spc)
    where 2: eval(expr, envir, enclos)
    where 3: eval(expr, envir, enclos)
    where 4: withVisible(eval(expr, envir, enclos))
    where 5: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler,
     error = eHandler, message = mHandler)
    where 6: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir,
     enclos)), warning = wHandler, error = eHandler, message = mHandler))
    where 7: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr,
     envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
    where 8: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos,
     debug = debug, last = i == length(out), use_try = stop_on_error !=
     2L, keep_warning = keep_warning, keep_message = keep_message,
     output_handler = output_handler, include_timing = include_timing)
    where 9: evaluate::evaluate(...)
    where 10: evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning),
     keep_message = !isFALSE(options$message), stop_on_error = if (options$error &&
     options$include) 0L else 2L, output_handler = knit_handlers(options$render,
     options))
    where 11: in_dir(input_dir(), evaluate(code, envir = env, new_device = FALSE,
     keep_warning = !isFALSE(options$warning), keep_message = !isFALSE(options$message),
     stop_on_error = if (options$error && options$include) 0L else 2L,
     output_handler = knit_handlers(options$render, options)))
    where 12: block_exec(params)
    where 13: call_block(x)
    where 14: process_group.block(group)
    where 15: process_group(group)
    where 16: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),
     error = function(e) {
     setwd(wd)
     cat(res, sep = "\n", file = output %n% "")
     message("Quitting from lines ", paste(current_lines(i),
     collapse = "-"), " (", knit_concord$get("infile"),
     ") ")
     })
    where 17: process_file(text, output)
    where 18: (if (grepl("\\.[Rr]md$", file)) knit2html_v1 else if (grepl("\\.[Rr]rst$",
     file)) knit2pandoc else knit)(file, encoding = encoding,
     quiet = quiet, envir = globalenv(), ...)
    where 19: engine$weave(file, quiet = quiet, encoding = enc)
    where 20: doTryCatch(return(expr), name, parentenv, handler)
    where 21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 22: tryCatchList(expr, classes, parentenv, handlers)
    where 23: tryCatch({
     engine$weave(file, quiet = quiet, encoding = enc)
     setwd(startdir)
     output <- find_vignette_product(name, by = "weave", engine = engine)
     if (!have.makefile && vignette_is_tex(output)) {
     texi2pdf(file = output, clean = FALSE, quiet = quiet)
     output <- find_vignette_product(name, by = "texi2pdf",
     engine = engine)
     }
     outputs <- c(outputs, output)
    }, error = function(e) {
     thisOK <<- FALSE
     fails <<- c(fails, file)
     message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s",
     file, conditionMessage(e)))
    })
    where 24: tools:::buildVignettes(dir = "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/prospectr.Rcheck/vign_test/prospectr",
     ser_elibs = "/home/hornik/tmp/scratch/RtmpxDdmdL/file2b3c68fffaf9.rds")
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (X)
    {
     if (!class(X) %in% c("matrix", "data.frame"))
     stop("X should be a matrix or data.frame")
     X <- sweep(X, 1, rowMeans(X, na.rm = T), "-")
     X <- sweep(X, 1, apply(X, 1, sd, na.rm = T), "/")
     return(X)
    }
    <bytecode: 0x555d13e78540>
    <environment: namespace:prospectr>
     --- function search by body ---
    Function standardNormalVariate in namespace prospectr has this body.
     ----------- END OF FAILURE REPORT --------------
    Quitting from lines 250-251 (prospectr-intro.Rnw)
    Error: processing vignette 'prospectr-intro.Rnw' failed with diagnostics:
    the condition has length > 1
    --- failed re-building ‘prospectr-intro.Rnw’
    
    SUMMARY: processing the following file failed:
     ‘prospectr-intro.Rnw’
    
    Error: Vignette re-building failed.
    Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 0.1.3
Check: installed package size
Result: NOTE
     installed size is 5.2Mb
     sub-directories of 1Mb or more:
     data 1.9Mb
     libs 2.7Mb
Flavors: r-devel-linux-x86_64-fedora-clang, r-release-osx-x86_64

Version: 0.1.3
Check: compiled code
Result: NOTE
    File ‘prospectr/libs/prospectr.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.1.3
Check: examples
Result: ERROR
    Running examples in ‘prospectr-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: blockNorm
    > ### Title: Sum of squares block weighting
    > ### Aliases: blockNorm
    >
    > ### ** Examples
    >
    > X <- matrix(rnorm(100),ncol=10)
    > # Block normalize to sum of square = 1
    > res <- blockNorm(X,1)
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    prospectr
     --- call from context ---
    blockNorm(X, 1)
     --- call from argument ---
    if (!class(X) %in% c("matrix", "data.frame")) stop("X should be a matrix or data.frame")
     --- R stacktrace ---
    where 1: blockNorm(X, 1)
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (X, targetnorm = 1)
    {
     if (!class(X) %in% c("matrix", "data.frame"))
     stop("X should be a matrix or data.frame")
     if (is.data.frame(X))
     X <- as.matrix(X)
     if (targetnorm == 1) {
     f <- sum(X^2, na.rm = T)^0.5
     }
     else {
     fmax <- sum(X^2, na.rm = T)
     fmaxn <- sum((X/fmax)^2, na.rm = T)
     if (fmaxn > targetnorm) {
     fmin <- fmax
     fminn <- fmaxn
     while (fminn > targetnorm) {
     fmin <- fmin * 10
     fminn <- sum((X/fmin)^2, na.rm = T)
     }
     }
     else {
     fmin <- fmax
     fminn <- fmaxn
     while (fmaxn < targetnorm) {
     fmax <- fmax/10
     fmaxn <- sum((X/fmax)^2, na.rm = T)
     }
     }
     n <- fmaxn
     while ((targetnorm - n)^2 > 1e-12) {
     f <- (fmin + fmax)/2
     n <- sum((X/f)^2, na.rm = T)
     if (n > targetnorm)
     fmax <- f
     else fmin <- f
     }
     }
     Xn <- X/f
     list(Xscaled = Xn, f = f)
    }
    <bytecode: 0x2dc2ca0>
    <environment: namespace:prospectr>
     --- function search by body ---
    Function blockNorm in namespace prospectr has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (!class(X) %in% c("matrix", "data.frame")) stop("X should be a matrix or data.frame") :
     the condition has length > 1
    Calls: blockNorm
    Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang

Version: 0.1.3
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
    --- re-building ‘prospectr-intro.Rnw’ using knitr
    Loading required package: RcppArmadillo
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    prospectr
     --- call from context ---
    standardNormalVariate(X = NIRsoil$spc)
     --- call from argument ---
    if (!class(X) %in% c("matrix", "data.frame")) stop("X should be a matrix or data.frame")
     --- R stacktrace ---
    where 1: standardNormalVariate(X = NIRsoil$spc)
    where 2: eval(expr, envir, enclos)
    where 3: eval(expr, envir, enclos)
    where 4: withVisible(eval(expr, envir, enclos))
    where 5: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler,
     error = eHandler, message = mHandler)
    where 6: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir,
     enclos)), warning = wHandler, error = eHandler, message = mHandler))
    where 7: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr,
     envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
    where 8: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos,
     debug = debug, last = i == length(out), use_try = stop_on_error !=
     2L, keep_warning = keep_warning, keep_message = keep_message,
     output_handler = output_handler, include_timing = include_timing)
    where 9: evaluate::evaluate(...)
    where 10: evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning),
     keep_message = !isFALSE(options$message), stop_on_error = if (options$error &&
     options$include) 0L else 2L, output_handler = knit_handlers(options$render,
     options))
    where 11: in_dir(input_dir(), evaluate(code, envir = env, new_device = FALSE,
     keep_warning = !isFALSE(options$warning), keep_message = !isFALSE(options$message),
     stop_on_error = if (options$error && options$include) 0L else 2L,
     output_handler = knit_handlers(options$render, options)))
    where 12: block_exec(params)
    where 13: call_block(x)
    where 14: process_group.block(group)
    where 15: process_group(group)
    where 16: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),
     error = function(e) {
     setwd(wd)
     cat(res, sep = "\n", file = output %n% "")
     message("Quitting from lines ", paste(current_lines(i),
     collapse = "-"), " (", knit_concord$get("infile"),
     ") ")
     })
    where 17: process_file(text, output)
    where 18: (if (grepl("\\.[Rr]md$", file)) knit2html_v1 else if (grepl("\\.[Rr]rst$",
     file)) knit2pandoc else knit)(file, encoding = encoding,
     quiet = quiet, envir = globalenv(), ...)
    where 19: engine$weave(file, quiet = quiet, encoding = enc)
    where 20: doTryCatch(return(expr), name, parentenv, handler)
    where 21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 22: tryCatchList(expr, classes, parentenv, handlers)
    where 23: tryCatch({
     engine$weave(file, quiet = quiet, encoding = enc)
     setwd(startdir)
     output <- find_vignette_product(name, by = "weave", engine = engine)
     if (!have.makefile && vignette_is_tex(output)) {
     texi2pdf(file = output, clean = FALSE, quiet = quiet)
     output <- find_vignette_product(name, by = "texi2pdf",
     engine = engine)
     }
     outputs <- c(outputs, output)
    }, error = function(e) {
     thisOK <<- FALSE
     fails <<- c(fails, file)
     message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s",
     file, conditionMessage(e)))
    })
    where 24: tools:::buildVignettes(dir = "/data/gannet/ripley/R/packages/tests-clang/prospectr.Rcheck/vign_test/prospectr",
     ser_elibs = "/tmp/RtmppKU8IP/file35cd320840a0.rds")
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (X)
    {
     if (!class(X) %in% c("matrix", "data.frame"))
     stop("X should be a matrix or data.frame")
     X <- sweep(X, 1, rowMeans(X, na.rm = T), "-")
     X <- sweep(X, 1, apply(X, 1, sd, na.rm = T), "/")
     return(X)
    }
    <bytecode: 0x5eae5f0>
    <environment: namespace:prospectr>
     --- function search by body ---
    Function standardNormalVariate in namespace prospectr has this body.
     ----------- END OF FAILURE REPORT --------------
    Quitting from lines 250-251 (prospectr-intro.Rnw)
    Error: processing vignette 'prospectr-intro.Rnw' failed with diagnostics:
    the condition has length > 1
    --- failed re-building ‘prospectr-intro.Rnw’
    
    SUMMARY: processing the following file failed:
     ‘prospectr-intro.Rnw’
    
    Error: Vignette re-building failed.
    Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang

Version: 0.1.3
Check: examples
Result: ERROR
    Running examples in ‘prospectr-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: blockNorm
    > ### Title: Sum of squares block weighting
    > ### Aliases: blockNorm
    >
    > ### ** Examples
    >
    > X <- matrix(rnorm(100),ncol=10)
    > # Block normalize to sum of square = 1
    > res <- blockNorm(X,1)
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    prospectr
     --- call from context ---
    blockNorm(X, 1)
     --- call from argument ---
    if (!class(X) %in% c("matrix", "data.frame")) stop("X should be a matrix or data.frame")
     --- R stacktrace ---
    where 1: blockNorm(X, 1)
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (X, targetnorm = 1)
    {
     if (!class(X) %in% c("matrix", "data.frame"))
     stop("X should be a matrix or data.frame")
     if (is.data.frame(X))
     X <- as.matrix(X)
     if (targetnorm == 1) {
     f <- sum(X^2, na.rm = T)^0.5
     }
     else {
     fmax <- sum(X^2, na.rm = T)
     fmaxn <- sum((X/fmax)^2, na.rm = T)
     if (fmaxn > targetnorm) {
     fmin <- fmax
     fminn <- fmaxn
     while (fminn > targetnorm) {
     fmin <- fmin * 10
     fminn <- sum((X/fmin)^2, na.rm = T)
     }
     }
     else {
     fmin <- fmax
     fminn <- fmaxn
     while (fmaxn < targetnorm) {
     fmax <- fmax/10
     fmaxn <- sum((X/fmax)^2, na.rm = T)
     }
     }
     n <- fmaxn
     while ((targetnorm - n)^2 > 1e-12) {
     f <- (fmin + fmax)/2
     n <- sum((X/f)^2, na.rm = T)
     if (n > targetnorm)
     fmax <- f
     else fmin <- f
     }
     }
     Xn <- X/f
     list(Xscaled = Xn, f = f)
    }
    <bytecode: 0x4270d78>
    <environment: namespace:prospectr>
     --- function search by body ---
    Function blockNorm in namespace prospectr has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (!class(X) %in% c("matrix", "data.frame")) stop("X should be a matrix or data.frame") :
     the condition has length > 1
    Calls: blockNorm
    Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc

Version: 0.1.3
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
    --- re-building ‘prospectr-intro.Rnw’ using knitr
    Loading required package: RcppArmadillo
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    prospectr
     --- call from context ---
    standardNormalVariate(X = NIRsoil$spc)
     --- call from argument ---
    if (!class(X) %in% c("matrix", "data.frame")) stop("X should be a matrix or data.frame")
     --- R stacktrace ---
    where 1: standardNormalVariate(X = NIRsoil$spc)
    where 2: eval(expr, envir, enclos)
    where 3: eval(expr, envir, enclos)
    where 4: withVisible(eval(expr, envir, enclos))
    where 5: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler,
     error = eHandler, message = mHandler)
    where 6: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir,
     enclos)), warning = wHandler, error = eHandler, message = mHandler))
    where 7: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr,
     envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
    where 8: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos,
     debug = debug, last = i == length(out), use_try = stop_on_error !=
     2L, keep_warning = keep_warning, keep_message = keep_message,
     output_handler = output_handler, include_timing = include_timing)
    where 9: evaluate::evaluate(...)
    where 10: evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning),
     keep_message = !isFALSE(options$message), stop_on_error = if (options$error &&
     options$include) 0L else 2L, output_handler = knit_handlers(options$render,
     options))
    where 11: in_dir(input_dir(), evaluate(code, envir = env, new_device = FALSE,
     keep_warning = !isFALSE(options$warning), keep_message = !isFALSE(options$message),
     stop_on_error = if (options$error && options$include) 0L else 2L,
     output_handler = knit_handlers(options$render, options)))
    where 12: block_exec(params)
    where 13: call_block(x)
    where 14: process_group.block(group)
    where 15: process_group(group)
    where 16: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),
     error = function(e) {
     setwd(wd)
     cat(res, sep = "\n", file = output %n% "")
     message("Quitting from lines ", paste(current_lines(i),
     collapse = "-"), " (", knit_concord$get("infile"),
     ") ")
     })
    where 17: process_file(text, output)
    where 18: (if (grepl("\\.[Rr]md$", file)) knit2html_v1 else if (grepl("\\.[Rr]rst$",
     file)) knit2pandoc else knit)(file, encoding = encoding,
     quiet = quiet, envir = globalenv(), ...)
    where 19: engine$weave(file, quiet = quiet, encoding = enc)
    where 20: doTryCatch(return(expr), name, parentenv, handler)
    where 21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 22: tryCatchList(expr, classes, parentenv, handlers)
    where 23: tryCatch({
     engine$weave(file, quiet = quiet, encoding = enc)
     setwd(startdir)
     output <- find_vignette_product(name, by = "weave", engine = engine)
     if (!have.makefile && vignette_is_tex(output)) {
     texi2pdf(file = output, clean = FALSE, quiet = quiet)
     output <- find_vignette_product(name, by = "texi2pdf",
     engine = engine)
     }
     outputs <- c(outputs, output)
    }, error = function(e) {
     thisOK <<- FALSE
     fails <<- c(fails, file)
     message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s",
     file, conditionMessage(e)))
    })
    where 24: tools:::buildVignettes(dir = "/data/gannet/ripley/R/packages/tests-devel/prospectr.Rcheck/vign_test/prospectr",
     ser_elibs = "/tmp/Rtmp3ohOu1/file12d05691ed1f.rds")
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (X)
    {
     if (!class(X) %in% c("matrix", "data.frame"))
     stop("X should be a matrix or data.frame")
     X <- sweep(X, 1, rowMeans(X, na.rm = T), "-")
     X <- sweep(X, 1, apply(X, 1, sd, na.rm = T), "/")
     return(X)
    }
    <bytecode: 0x551fe90>
    <environment: namespace:prospectr>
     --- function search by body ---
    Function standardNormalVariate in namespace prospectr has this body.
     ----------- END OF FAILURE REPORT --------------
    Quitting from lines 250-251 (prospectr-intro.Rnw)
    Error: processing vignette 'prospectr-intro.Rnw' failed with diagnostics:
    the condition has length > 1
    --- failed re-building ‘prospectr-intro.Rnw’
    
    SUMMARY: processing the following file failed:
     ‘prospectr-intro.Rnw’
    
    Error: Vignette re-building failed.
    Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc