* using log directory ‘/data/blackswan/ripley/R/packages/tests-devel/SoundShape.Rcheck’ * using R Under development (unstable) (2022-04-05 r82089) * using platform: x86_64-pc-linux-gnu (64-bit) * using session charset: UTF-8 * checking for file ‘SoundShape/DESCRIPTION’ ... OK * this is package ‘SoundShape’ version ‘1.1.9’ * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘SoundShape’ can be installed ... OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking contents of ‘data’ directory ... OK * checking data for non-ASCII characters ... OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... OK * checking examples with --run-donttest ... ERROR Running examples in ‘SoundShape-Ex.R’ failed The error most likely occurred in: > ### Name: align.wave > ### Title: Automatic placement of calls at beggining of sound window > ### Aliases: align.wave > > ### ** Examples > > ## No test: > library(seewave) > library(tuneR) > > # Create temporary folder to store ".wav" files > wav.at <- file.path(base::tempdir(), "align.wave") > if(!dir.exists(wav.at)) dir.create(wav.at) > > # Create temporary folder to store results > store.at <- file.path(base::tempdir(), "align.wave-output") > if(!dir.exists(store.at)) dir.create(store.at) > > # Select acoustic units to be analyzed > data(cuvieri) > spectro(cuvieri, flim = c(0,3)) # Visualize sound data that will be used > > # Cut acoustic units from original Wave > cut.cuvieri1 <- cutw(cuvieri, f=44100, from=0, to=0.5, output = "Wave") > cut.cuvieri2 <- cutw(cuvieri, f=44100, from=0.7, to=1.2, output = "Wave") > cut.cuvieri3 <- cutw(cuvieri, f=44100, from=1.4, to=1.9, output = "Wave") > > # Export ".wav" files containing selected acoustic units and store on previosly created folder > writeWave(cut.cuvieri1, filename = file.path(wav.at, "cut.cuvieri1.wav"), extensible = FALSE) > writeWave(cut.cuvieri2, filename = file.path(wav.at, "cut.cuvieri2.wav"), extensible = FALSE) > writeWave(cut.cuvieri3, filename = file.path(wav.at, "cut.cuvieri3.wav"), extensible = FALSE) > > # Align acoustic units selected at 1% of time lenght > align.wave(wav.at = wav.at, wav.to = "Aligned", + time.length = 0.5, time.perc = 0.01, dBlevel = 25) > > # Verify alignment using eigensound function featuring analysis.type = "twoDshape" > eigensound(analysis.type = "twoDshape", wav.at = file.path(wav.at, "Aligned"), store.at = store.at, + flim=c(0, 3), tlim=c(0,0.5), dBlevel = 25, plot.exp = TRUE, plot.as = "jpeg") ----------- FAILURE REPORT -------------- --- failure: length > 1 in coercion to logical --- --- srcref --- : --- package (from environment) --- seewave --- call from context --- seewave::spectro(Wav, f = f, wl = wl, ovlp = ovlp, osc = F, scale = F, grid = F, main = sub(".wav", "", file), trel = trel, flim = flim, tlim = tlim, cont = add.contour, contlevels = seq(-dBlevel, -dBlevel, 1), lwd = lwd, collevels = seq(-back.amp, 0, 0.1)) --- call from argument --- !is.null(tlim) && trel --- R stacktrace --- where 1: seewave::spectro(Wav, f = f, wl = wl, ovlp = ovlp, osc = F, scale = F, grid = F, main = sub(".wav", "", file), trel = trel, flim = flim, tlim = tlim, cont = add.contour, contlevels = seq(-dBlevel, -dBlevel, 1), lwd = lwd, collevels = seq(-back.amp, 0, 0.1)) where 2: eigensound(analysis.type = "twoDshape", wav.at = file.path(wav.at, "Aligned"), store.at = store.at, flim = c(0, 3), tlim = c(0, 0.5), dBlevel = 25, plot.exp = TRUE, plot.as = "jpeg") --- value of length: 2 type: double --- [1] 0.0 0.5 --- function from context --- function (wave, f, channel = 1, wl = 512, wn = "hanning", zp = 0, ovlp = 0, noisereduction = NULL, fastdisp = FALSE, complex = FALSE, norm = TRUE, correction = "none", fftw = FALSE, dB = "max0", dBref = NULL, plot = TRUE, flog = FALSE, grid = TRUE, osc = FALSE, scale = TRUE, cont = FALSE, collevels = NULL, palette = spectro.colors, contlevels = NULL, colcont = "black", colbg = "white", colgrid = "black", colaxis = "black", collab = "black", cexlab = 1, cexaxis = 1, tlab = "Time (s)", flab = "Frequency (kHz)", alab = "Amplitude", scalelab = "Amplitude\n(dB)", main = NULL, scalefontlab = 1, scalecexlab = 0.75, axisX = TRUE, axisY = TRUE, tlim = NULL, trel = TRUE, flim = NULL, flimd = NULL, widths = c(6, 1), heights = c(3, 1), oma = rep(0, 4), listen = FALSE, ...) { ptm.start <- proc.time() if (wl%%2 == 1) stop("'wl' has to be an even number.") if (!is.null(dB) && all(dB != c("max0", "A", "B", "C", "D"))) stop("'dB' has to be one of the following character strings: 'max0', 'A', 'B', 'C' or 'D'") if (complex) { if (plot) { plot <- FALSE warning("\n'plot' was turned to 'FALSE'") } if (norm) { norm <- FALSE warning("\n'norm' was turned to 'FALSE'") } if (!is.null(dB)) { dB <- NULL warning("\n'dB' was turned to 'NULL'") } } input <- inputw(wave = wave, f = f, channel = channel) if (!is.null(tlim) && trel && osc) { wave <- wave0 <- input$w } else { wave <- input$w } f <- input$f rm(input) if (!is.null(tlim)) wave <- cutw(wave, f = f, from = tlim[1], to = tlim[2]) if (!is.null(flimd)) { mag <- round((f/2000)/(flimd[2] - flimd[1])) wl <- wl * mag if (ovlp == 0) ovlp <- 100 ovlp <- 100 - round(ovlp/mag) flim <- flimd } n <- nrow(wave) step <- seq(1, n + 1 - wl, wl - (ovlp * wl/100)) z <- stdft(wave = wave, f = f, wl = wl, zp = zp, step = step, wn = wn, fftw = fftw, scale = norm, complex = complex, correction = correction) if (!is.null(noisereduction)) { if (noisereduction != 1 & noisereduction != 2) stop("If not NULL, 'noisereduction' should be 1 or 2") noise <- apply(z, MARGIN = noisereduction, FUN = median) z <- abs(z - noise) } if (!is.null(tlim) && trel) { X <- seq(tlim[1], tlim[2], length.out = length(step)) } else { X <- seq(0, n/f, length.out = length(step)) } xat <- xlabel <- pretty(X) if (is.null(flim)) { Y <- seq(0, (f/2) - (f/(wl + zp)), by = f/(wl + zp))/1000 } else { fl1 <- flim[1] * nrow(z) * 2000/f fl2 <- flim[2] * nrow(z) * 2000/f z <- z[(fl1:fl2) + 1, ] Y <- seq(flim[1], flim[2], length.out = nrow(z)) } yat <- ylabel <- pretty(Y) if (flog) { Y <- log(Y + 1) yat <- log(yat + 1) } if (!is.null(dB)) { if (is.null(dBref)) { z <- 20 * log10(z) } else { z <- 20 * log10(z/dBref) } if (dB != "max0") { if (dB == "A") z <- dBweight(Y * 1000, dBref = z)$A if (dB == "B") z <- dBweight(Y * 1000, dBref = z)$B if (dB == "C") z <- dBweight(Y * 1000, dBref = z)$C if (dB == "D") z <- dBweight(Y * 1000, dBref = z)$D } } Z <- t(z) if (plot) { if (!isTRUE(norm) && isTRUE(scale)) stop("dB colour scale cannot be plot when 'norm' is FALSE") maxz <- round(max(z, na.rm = TRUE)) if (!is.null(dB)) { if (is.null(collevels)) collevels <- seq(maxz - 30, maxz, by = 1) if (is.null(contlevels)) contlevels <- seq(maxz - 30, maxz, by = 10) } else { if (is.null(collevels)) collevels <- seq(0, maxz, length = 30) if (is.null(contlevels)) contlevels <- seq(0, maxz, length = 3) } Zlim <- range(Z, finite = TRUE, na.rm = TRUE) if (isTRUE(fastdisp) & length(step) > 300) { res <- 300 } else { res = length(step) } if (osc & scale) { layout(matrix(c(3, 1, 2, 0), ncol = 2, byrow = TRUE), widths = widths, heights = heights) par(las = 0, oma = oma, col = "white", col = colaxis, col.lab = collab, cex.lab = cexlab, cex.axis = cexaxis, bg = colbg) par(mar = c(0, 1, 4.5, 3)) dBscale(collevels = collevels, palette = palette, fontlab = scalefontlab, cexlab = scalecexlab, collab = collab, textlab = scalelab, colaxis = colaxis) par(mar = c(5, 4.1, 0, 0)) if (!is.null(tlim) && trel) { wave <- wave0 from <- tlim[1] to <- tlim[2] } else { from <- FALSE to <- FALSE } soscillo(wave = wave, f = f, bty = "u", from = from, to = to, fastdisp = fastdisp, collab = collab, colaxis = colaxis, colline = colaxis, ylim = c(-max(abs(wave)), max(abs(wave))), tickup = max(abs(wave), na.rm = TRUE), tlab = tlab, alab = alab, cexlab = cexlab, cexaxis = cexaxis, xaxt = { if (!axisX) { "n" } }, ...) par(mar = c(0, 4.1, 1, 0), las = 1, cex.lab = cexlab + 0.2) filled.contour.modif2(x = X[seq(1, length(X), length = res)], y = Y, z = Z[seq(1, nrow(Z), length = res), ], levels = collevels, nlevels = 20, plot.title = title(main = main, xlab = "", ylab = flab), plot.axes = { if (axisY) { axis(2, at = yat, labels = ylabel) } else { NULL } }, color.palette = palette) if (grid) abline(h = yat, col = colgrid, lty = "dotted") if (cont) { contour(X, Y, Z, add = TRUE, levels = contlevels, nlevels = 5, col = colcont, ...) } if (colaxis != colgrid) abline(h = 0, col = colaxis) else abline(h = 0, col = colgrid) } if (osc == FALSE & scale) { layout(matrix(c(2, 1), ncol = 2, byrow = TRUE), widths = widths) par(mar = c(5, 1, 4.5, 3), oma = oma, las = 0, col = colaxis, col.axis = colaxis, col.lab = collab, bg = colbg, cex.axis = cexaxis, cex.lab = cexlab, ...) dBscale(collevels = collevels, palette = palette, fontlab = scalefontlab, cexlab = scalecexlab, collab = collab, textlab = scalelab, colaxis = colaxis) par(mar = c(5, 4.1, 1, 0), las = 1, cex = 1, col = colaxis, col.axis = colaxis, col.lab = collab, bg = colbg, cex.lab = cexlab + 0.2) filled.contour.modif2(x = X[seq(1, length(X), length = res)], y = Y, z = Z[seq(1, nrow(Z), length = res), ], levels = collevels, nlevels = 20, plot.title = title(main = main, xlab = tlab, ylab = flab), plot.axes = { if (axisX) { axis(1, at = xat, labels = xlabel) } if (axisY) { axis(2, at = yat, labels = ylabel) } }, color.palette = palette) if (grid) abline(h = yat, col = colgrid, lty = "dotted") if (colaxis != colgrid) abline(h = 0, col = colaxis) else abline(h = 0, col = colgrid) if (cont) { contour(X, Y, Z, add = TRUE, levels = contlevels, nlevels = 5, col = colcont, ...) } } if (osc & scale == FALSE) { layout(matrix(c(2, 1), nrow = 2, byrow = TRUE), heights = heights) par(mar = c(5.1, 4.1, 0, 2.1), las = 0, oma = oma, bg = colbg) if (!is.null(tlim) && trel) { wave <- wave0 from <- tlim[1] to <- tlim[2] } else { from <- FALSE to <- FALSE } soscillo(wave = wave, f = f, bty = "u", from = from, to = to, fastdisp = fastdisp, collab = collab, colaxis = colaxis, colline = colaxis, tickup = max(abs(wave), na.rm = TRUE), ylim = c(-max(abs(wave)), max(abs(wave))), tlab = tlab, alab = alab, cexlab = cexlab, cexaxis = cexaxis, xaxt = { if (!axisX) { "n" } }, ...) par(mar = c(0, 4.1, 2.1, 2.1), las = 1, cex.lab = cexlab) filled.contour.modif2(x = X[seq(1, length(X), length = res)], y = Y, z = Z[seq(1, nrow(Z), length = res), ], levels = collevels, nlevels = 20, plot.title = title(main = main, xlab = "", ylab = flab), color.palette = palette, plot.axes = { if (axisY) { axis(2, at = yat, labels = ylabel) } else { NULL } }, col.lab = collab, colaxis = colaxis, ...) if (grid) abline(h = yat, col = colgrid, lty = "dotted") if (cont) { contour(X, Y, Z, add = TRUE, levels = contlevels, nlevels = 5, col = colcont, ...) } if (colaxis != colgrid) abline(h = 0, col = colaxis) else abline(h = 0, col = colgrid) } if (osc == FALSE & scale == FALSE) { par(las = 1, col = colaxis, col.axis = colaxis, col.lab = collab, bg = colbg, cex.axis = cexaxis, cex.lab = cexlab, ...) filled.contour.modif2(x = X[seq(1, length(X), length = res)], y = Y, z = Z[seq(1, nrow(Z), length = res), ], levels = collevels, nlevels = 20, plot.title = title(main = main, xlab = tlab, ylab = flab), plot.axes = { if (axisX) { axis(1, at = xat, labels = xlabel) } if (axisY) { axis(2, at = yat, labels = ylabel) } }, color.palette = palette, col.lab = collab, colaxis = colaxis) if (grid) abline(h = yat, col = colgrid, lty = "dotted") if (cont) { contour(X, Y, Z, add = TRUE, levels = contlevels, nlevels = 5, col = colcont, ...) } if (colaxis != colgrid) abline(h = 0, col = colaxis) else abline(h = 0, col = colgrid) } if (listen) { listen(wave, f = f) } ptm <- proc.time() - ptm.start if (isTRUE(plot) && ptm[3] > 10) cat("This took quite a lot of time to display this graphic, you may set 'fastdisp=TRUE' for a faster, but less accurate, display\n") invisible(list(time = X, freq = Y, amp = z)) } else return(list(time = X, freq = Y, amp = z)) } --- function search by body --- Function spectro in namespace seewave has this body. ----------- END OF FAILURE REPORT -------------- Fatal error: length > 1 in coercion to logical * checking for unstated dependencies in vignettes ... OK * checking package vignettes in ‘inst/doc’ ... OK * checking re-building of vignette outputs ... [23s/23s] OK * checking PDF version of manual ... OK * checking for non-standard things in the check directory ... OK * checking for detritus in the temp directory ... OK * checking for new files in some other directories ... OK * DONE Status: 1 ERROR See ‘/data/blackswan/ripley/R/packages/tests-devel/SoundShape.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 0:55.67, 48.37 + 7.35