CRAN Package Check Results for Package recipes

Last updated on 2018-11-14 05:49:41 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.1.3 19.19 247.38 266.57 ERROR
r-devel-linux-x86_64-debian-gcc 0.1.3 15.61 195.11 210.72 ERROR
r-devel-linux-x86_64-fedora-clang 0.1.3 335.08 ERROR
r-devel-linux-x86_64-fedora-gcc 0.1.3 304.16 ERROR
r-devel-windows-ix86+x86_64 0.1.3 30.00 323.00 353.00 ERROR
r-patched-linux-x86_64 0.1.3 13.03 205.09 218.12 ERROR
r-patched-solaris-x86 0.1.3 338.10 ERROR
r-release-linux-x86_64 0.1.3 16.28 211.28 227.56 ERROR
r-release-windows-ix86+x86_64 0.1.3 43.00 218.00 261.00 ERROR
r-release-osx-x86_64 0.1.3 OK
r-oldrel-windows-ix86+x86_64 0.1.3 36.00 319.00 355.00 ERROR
r-oldrel-osx-x86_64 0.1.3 OK

Check Details

Version: 0.1.3
Check: examples
Result: ERROR
    Running examples in ‘recipes-Ex.R’ failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: step_isomap
    > ### Title: Isomap Embedding
    > ### Aliases: step_isomap tidy.step_isomap
    > ### Keywords: datagen
    >
    > ### ** Examples
    >
    > data(biomass)
    >
    > biomass_tr <- biomass[biomass$dataset == "Training",]
    > biomass_te <- biomass[biomass$dataset == "Testing",]
    >
    > rec <- recipe(HHV ~ carbon + hydrogen + oxygen + nitrogen + sulfur,
    + data = biomass_tr)
    >
    > im_trans <- rec %>%
    + step_YeoJohnson(all_predictors()) %>%
    + step_center(all_predictors()) %>%
    + step_scale(all_predictors()) %>%
    + step_isomap(all_predictors(),
    + options = list(knn = 100),
    + num = 2)
    >
    > im_estimates <- prep(im_trans, training = biomass_tr)
    Error in chckpkg("RSpectra") :
     require 'RSpectra' package, install it using install.packages('RSpectra')
    Calls: prep ... embed -> .local -> do.call -> <Anonymous> -> chckpkg
    Execution halted
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-patched-linux-x86_64, r-release-linux-x86_64

Version: 0.1.3
Check: tests
Result: ERROR
     Running ‘testthat.R’ [34s/35s]
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > library(recipes)
     Loading required package: dplyr
    
     Attaching package: 'dplyr'
    
     The following object is masked from 'package:testthat':
    
     matches
    
     The following objects are masked from 'package:stats':
    
     filter, lag
    
     The following objects are masked from 'package:base':
    
     intersect, setdiff, setequal, union
    
     Loading required package: broom
    
     Attaching package: 'recipes'
    
     The following object is masked from 'package:stats':
    
     step
    
     >
     > test_check(package = "recipes")
     ── 1. Error: printing (@test_isomap.R#47) ─────────────────────────────────────
     require 'RSpectra' package, install it using install.packages('RSpectra')
     1: expect_output(prep(im_rec, training = dat1, verbose = TRUE)) at testthat/test_isomap.R:47
     2: quasi_capture(enquo(object), capture_output, label = label)
     3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
     4: capture_output_lines(code, print, width = width)
     5: eval_with_output(code, print = print, width = width)
     6: withr::with_output_sink(temp, withVisible(code))
     7: force(code)
     8: withVisible(code)
     9: eval_bare(get_expr(quo), get_env(quo))
     10: prep(im_rec, training = dat1, verbose = TRUE)
     11: prep.recipe(im_rec, training = dat1, verbose = TRUE)
     12: prep(x$steps[[i]], training = training, info = x$term_info)
     13: prep.step_isomap(x$steps[[i]], training = training, info = x$term_info)
     14: embed(dimRedData(as.data.frame(training[, col_names, drop = FALSE])), "Isomap", knn = x$options$knn,
     ndim = x$num, .mute = x$options$.mute)
     15: embed(dimRedData(as.data.frame(training[, col_names, drop = FALSE])), "Isomap", knn = x$options$knn,
     ndim = x$num, .mute = x$options$.mute)
     16: .local(.data, ...)
     17: do.call(methodObject@fun, args)
     18: (function (data, pars, keep.org.data = TRUE)
     {
     chckpkg("RSpectra")
     chckpkg("igraph")
     chckpkg("RANN")
     message(Sys.time(), ": Isomap START")
     meta <- data@meta
     orgdata <- if (keep.org.data)
     data@data
     else NULL
     indata <- data@data
     if (is.null(pars$eps))
     pars$eps <- 0
     if (is.null(pars$get_geod))
     pars$get_geod <- FALSE
     message(Sys.time(), ": constructing knn graph")
     knng <- makeKNNgraph(x = indata, k = pars$knn, eps = pars$eps)
     message(Sys.time(), ": calculating geodesic distances")
     geodist <- igraph::distances(knng, algorithm = "dijkstra")
     message(Sys.time(), ": Classical Scaling")
     k <- geodist^2
     k <- .Call(stats:::C_DoubleCentre, k)
     k <- -k/2
     e <- RSpectra::eigs_sym(k, pars$ndim, which = "LA", opts = list(retvec = TRUE))
     e_values <- e$values
     e_vectors <- e$vectors
     neig <- sum(e_values > 0)
     if (neig < pars$ndim) {
     warning("Isomap: eigenvalues < 0, returning less dimensions!")
     e_values <- e_values[seq_len(neig)]
     e_vectors <- e_vectors[, seq_len(neig), drop = FALSE]
     }
     e_vectors <- e_vectors * rep(sqrt(e_values), each = nrow(e_vectors))
     colnames(e_vectors) <- paste("iso", seq_len(neig))
     appl <- function(x) {
     message(Sys.time(), ": L-Isomap embed START")
     appl.meta <- if (inherits(x, "dimRedData"))
     x@meta
     else data.frame()
     indata <- if (inherits(x, "dimRedData"))
     x@data
     else x
     if (ncol(indata) != ncol(data@data))
     stop("x must have the same number of dimensions as the original data")
     nindata <- nrow(indata)
     norg <- nrow(orgdata)
     message(Sys.time(), ": constructing knn graph")
     lknng <- makeKNNgraph(rbind(indata, orgdata), k = pars$knn, eps = pars$eps)
     message(Sys.time(), ": calculating geodesic distances")
     lgeodist <- igraph::distances(lknng, seq_len(nindata), nindata + seq_len(norg))
     message(Sys.time(), ": embedding")
     dammu <- sweep(lgeodist^2, 2, colMeans(geodist^2), "-")
     Lsharp <- sweep(e_vectors, 2, e_values, "/")
     out <- -0.5 * (dammu %*% Lsharp)
     message(Sys.time(), ": DONE")
     return(new("dimRedData", data = out, meta = appl.meta))
     }
     return(new("dimRedResult", data = new("dimRedData", data = e_vectors, meta = meta),
     org.data = orgdata, has.org.data = keep.org.data, apply = appl, has.apply = TRUE,
     method = "Isomap", pars = pars, other.data = if (pars$get_geod) list(geod = as.dist(geodist)) else list()))
     })(data = new("dimRedData", data = structure(c(-0.626453810742332, 0.183643324222082,
     -0.835628612410047, 1.59528080213779, 0.329507771815361, -0.820468384118015, 0.487429052428485,
     0.738324705129217, 0.575781351653492, -0.305388387156356, 1.51178116845085, 0.389843236411431,
     -0.621240580541804, -2.2146998871775, 1.12493091814311), .Dim = c(5L, 3L), .Dimnames = list(
     NULL, c("x1", "x2", "x3"))), meta = structure(list(), .Names = character(0), row.names = integer(0), class = "data.frame")),
     keep.org.data = TRUE, pars = list(knn = 3, ndim = 3, get_geod = FALSE))
     19: chckpkg("RSpectra")
     20: stop(paste0("require '", pkg, "' package, install it using install.packages('", pkg,
     "')"))
    
     ══ testthat results ═══════════════════════════════════════════════════════════
     OK: 1016 SKIPPED: 3 FAILED: 1
     1. Error: printing (@test_isomap.R#47)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 0.1.3
Check: tests
Result: ERROR
     Running ‘testthat.R’ [25s/32s]
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > library(recipes)
     Loading required package: dplyr
    
     Attaching package: 'dplyr'
    
     The following object is masked from 'package:testthat':
    
     matches
    
     The following objects are masked from 'package:stats':
    
     filter, lag
    
     The following objects are masked from 'package:base':
    
     intersect, setdiff, setequal, union
    
     Loading required package: broom
    
     Attaching package: 'recipes'
    
     The following object is masked from 'package:stats':
    
     step
    
     >
     > test_check(package = "recipes")
     ── 1. Error: printing (@test_isomap.R#47) ─────────────────────────────────────
     require 'RSpectra' package, install it using install.packages('RSpectra')
     1: expect_output(prep(im_rec, training = dat1, verbose = TRUE)) at testthat/test_isomap.R:47
     2: quasi_capture(enquo(object), capture_output, label = label)
     3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
     4: capture_output_lines(code, print, width = width)
     5: eval_with_output(code, print = print, width = width)
     6: withr::with_output_sink(temp, withVisible(code))
     7: force(code)
     8: withVisible(code)
     9: eval_bare(get_expr(quo), get_env(quo))
     10: prep(im_rec, training = dat1, verbose = TRUE)
     11: prep.recipe(im_rec, training = dat1, verbose = TRUE)
     12: prep(x$steps[[i]], training = training, info = x$term_info)
     13: prep.step_isomap(x$steps[[i]], training = training, info = x$term_info)
     14: embed(dimRedData(as.data.frame(training[, col_names, drop = FALSE])), "Isomap", knn = x$options$knn,
     ndim = x$num, .mute = x$options$.mute)
     15: embed(dimRedData(as.data.frame(training[, col_names, drop = FALSE])), "Isomap", knn = x$options$knn,
     ndim = x$num, .mute = x$options$.mute)
     16: .local(.data, ...)
     17: do.call(methodObject@fun, args)
     18: (function (data, pars, keep.org.data = TRUE)
     {
     chckpkg("RSpectra")
     chckpkg("igraph")
     chckpkg("RANN")
     message(Sys.time(), ": Isomap START")
     meta <- data@meta
     orgdata <- if (keep.org.data)
     data@data
     else NULL
     indata <- data@data
     if (is.null(pars$eps))
     pars$eps <- 0
     if (is.null(pars$get_geod))
     pars$get_geod <- FALSE
     message(Sys.time(), ": constructing knn graph")
     knng <- makeKNNgraph(x = indata, k = pars$knn, eps = pars$eps)
     message(Sys.time(), ": calculating geodesic distances")
     geodist <- igraph::distances(knng, algorithm = "dijkstra")
     message(Sys.time(), ": Classical Scaling")
     k <- geodist^2
     k <- .Call(stats:::C_DoubleCentre, k)
     k <- -k/2
     e <- RSpectra::eigs_sym(k, pars$ndim, which = "LA", opts = list(retvec = TRUE))
     e_values <- e$values
     e_vectors <- e$vectors
     neig <- sum(e_values > 0)
     if (neig < pars$ndim) {
     warning("Isomap: eigenvalues < 0, returning less dimensions!")
     e_values <- e_values[seq_len(neig)]
     e_vectors <- e_vectors[, seq_len(neig), drop = FALSE]
     }
     e_vectors <- e_vectors * rep(sqrt(e_values), each = nrow(e_vectors))
     colnames(e_vectors) <- paste("iso", seq_len(neig))
     appl <- function(x) {
     message(Sys.time(), ": L-Isomap embed START")
     appl.meta <- if (inherits(x, "dimRedData"))
     x@meta
     else data.frame()
     indata <- if (inherits(x, "dimRedData"))
     x@data
     else x
     if (ncol(indata) != ncol(data@data))
     stop("x must have the same number of dimensions as the original data")
     nindata <- nrow(indata)
     norg <- nrow(orgdata)
     message(Sys.time(), ": constructing knn graph")
     lknng <- makeKNNgraph(rbind(indata, orgdata), k = pars$knn, eps = pars$eps)
     message(Sys.time(), ": calculating geodesic distances")
     lgeodist <- igraph::distances(lknng, seq_len(nindata), nindata + seq_len(norg))
     message(Sys.time(), ": embedding")
     dammu <- sweep(lgeodist^2, 2, colMeans(geodist^2), "-")
     Lsharp <- sweep(e_vectors, 2, e_values, "/")
     out <- -0.5 * (dammu %*% Lsharp)
     message(Sys.time(), ": DONE")
     return(new("dimRedData", data = out, meta = appl.meta))
     }
     return(new("dimRedResult", data = new("dimRedData", data = e_vectors, meta = meta),
     org.data = orgdata, has.org.data = keep.org.data, apply = appl, has.apply = TRUE,
     method = "Isomap", pars = pars, other.data = if (pars$get_geod) list(geod = as.dist(geodist)) else list()))
     })(data = new("dimRedData", data = structure(c(-0.626453810742332, 0.183643324222082,
     -0.835628612410047, 1.59528080213779, 0.329507771815361, -0.820468384118015, 0.487429052428485,
     0.738324705129217, 0.575781351653492, -0.305388387156356, 1.51178116845085, 0.389843236411431,
     -0.621240580541804, -2.2146998871775, 1.12493091814311), .Dim = c(5L, 3L), .Dimnames = list(
     NULL, c("x1", "x2", "x3"))), meta = structure(list(), .Names = character(0), row.names = integer(0), class = "data.frame")),
     keep.org.data = TRUE, pars = list(knn = 3, ndim = 3, get_geod = FALSE))
     19: chckpkg("RSpectra")
     20: stop(paste0("require '", pkg, "' package, install it using install.packages('", pkg,
     "')"))
    
     ══ testthat results ═══════════════════════════════════════════════════════════
     OK: 1016 SKIPPED: 3 FAILED: 1
     1. Error: printing (@test_isomap.R#47)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 0.1.3
Check: examples
Result: ERROR
    Running examples in ‘recipes-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: step_isomap
    > ### Title: Isomap Embedding
    > ### Aliases: step_isomap tidy.step_isomap
    > ### Keywords: datagen
    >
    > ### ** Examples
    >
    > data(biomass)
    >
    > biomass_tr <- biomass[biomass$dataset == "Training",]
    > biomass_te <- biomass[biomass$dataset == "Testing",]
    >
    > rec <- recipe(HHV ~ carbon + hydrogen + oxygen + nitrogen + sulfur,
    + data = biomass_tr)
    >
    > im_trans <- rec %>%
    + step_YeoJohnson(all_predictors()) %>%
    + step_center(all_predictors()) %>%
    + step_scale(all_predictors()) %>%
    + step_isomap(all_predictors(),
    + options = list(knn = 100),
    + num = 2)
    >
    > im_estimates <- prep(im_trans, training = biomass_tr)
    Error in chckpkg("RSpectra") :
     require 'RSpectra' package, install it using install.packages('RSpectra')
    Calls: prep ... embed -> .local -> do.call -> <Anonymous> -> chckpkg
    Execution halted
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-ix86+x86_64, r-patched-solaris-x86, r-release-windows-ix86+x86_64

Version: 0.1.3
Check: tests
Result: ERROR
     Running ‘testthat.R’ [43s/105s]
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > library(recipes)
     Loading required package: dplyr
    
     Attaching package: 'dplyr'
    
     The following object is masked from 'package:testthat':
    
     matches
    
     The following objects are masked from 'package:stats':
    
     filter, lag
    
     The following objects are masked from 'package:base':
    
     intersect, setdiff, setequal, union
    
     Loading required package: broom
    
     Attaching package: 'recipes'
    
     The following object is masked from 'package:stats':
    
     step
    
     >
     > test_check(package = "recipes")
     ── 1. Error: printing (@test_isomap.R#47) ─────────────────────────────────────
     require 'RSpectra' package, install it using install.packages('RSpectra')
     1: expect_output(prep(im_rec, training = dat1, verbose = TRUE)) at testthat/test_isomap.R:47
     2: quasi_capture(enquo(object), capture_output, label = label)
     3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
     4: capture_output_lines(code, print, width = width)
     5: eval_with_output(code, print = print, width = width)
     6: withr::with_output_sink(temp, withVisible(code))
     7: force(code)
     8: withVisible(code)
     9: eval_bare(get_expr(quo), get_env(quo))
     10: prep(im_rec, training = dat1, verbose = TRUE)
     11: prep.recipe(im_rec, training = dat1, verbose = TRUE)
     12: prep(x$steps[[i]], training = training, info = x$term_info)
     13: prep.step_isomap(x$steps[[i]], training = training, info = x$term_info)
     14: embed(dimRedData(as.data.frame(training[, col_names, drop = FALSE])), "Isomap", knn = x$options$knn,
     ndim = x$num, .mute = x$options$.mute)
     15: embed(dimRedData(as.data.frame(training[, col_names, drop = FALSE])), "Isomap", knn = x$options$knn,
     ndim = x$num, .mute = x$options$.mute)
     16: .local(.data, ...)
     17: do.call(methodObject@fun, args)
     18: (function (data, pars, keep.org.data = TRUE)
     {
     chckpkg("RSpectra")
     chckpkg("igraph")
     chckpkg("RANN")
     message(Sys.time(), ": Isomap START")
     meta <- data@meta
     orgdata <- if (keep.org.data)
     data@data
     else NULL
     indata <- data@data
     if (is.null(pars$eps))
     pars$eps <- 0
     if (is.null(pars$get_geod))
     pars$get_geod <- FALSE
     message(Sys.time(), ": constructing knn graph")
     knng <- makeKNNgraph(x = indata, k = pars$knn, eps = pars$eps)
     message(Sys.time(), ": calculating geodesic distances")
     geodist <- igraph::distances(knng, algorithm = "dijkstra")
     message(Sys.time(), ": Classical Scaling")
     k <- geodist^2
     k <- .Call(stats:::C_DoubleCentre, k)
     k <- -k/2
     e <- RSpectra::eigs_sym(k, pars$ndim, which = "LA", opts = list(retvec = TRUE))
     e_values <- e$values
     e_vectors <- e$vectors
     neig <- sum(e_values > 0)
     if (neig < pars$ndim) {
     warning("Isomap: eigenvalues < 0, returning less dimensions!")
     e_values <- e_values[seq_len(neig)]
     e_vectors <- e_vectors[, seq_len(neig), drop = FALSE]
     }
     e_vectors <- e_vectors * rep(sqrt(e_values), each = nrow(e_vectors))
     colnames(e_vectors) <- paste("iso", seq_len(neig))
     appl <- function(x) {
     message(Sys.time(), ": L-Isomap embed START")
     appl.meta <- if (inherits(x, "dimRedData"))
     x@meta
     else data.frame()
     indata <- if (inherits(x, "dimRedData"))
     x@data
     else x
     if (ncol(indata) != ncol(data@data))
     stop("x must have the same number of dimensions as the original data")
     nindata <- nrow(indata)
     norg <- nrow(orgdata)
     message(Sys.time(), ": constructing knn graph")
     lknng <- makeKNNgraph(rbind(indata, orgdata), k = pars$knn, eps = pars$eps)
     message(Sys.time(), ": calculating geodesic distances")
     lgeodist <- igraph::distances(lknng, seq_len(nindata), nindata + seq_len(norg))
     message(Sys.time(), ": embedding")
     dammu <- sweep(lgeodist^2, 2, colMeans(geodist^2), "-")
     Lsharp <- sweep(e_vectors, 2, e_values, "/")
     out <- -0.5 * (dammu %*% Lsharp)
     message(Sys.time(), ": DONE")
     return(new("dimRedData", data = out, meta = appl.meta))
     }
     return(new("dimRedResult", data = new("dimRedData", data = e_vectors, meta = meta),
     org.data = orgdata, has.org.data = keep.org.data, apply = appl, has.apply = TRUE,
     method = "Isomap", pars = pars, other.data = if (pars$get_geod) list(geod = as.dist(geodist)) else list()))
     })(data = new("dimRedData", data = structure(c(-0.626453810742332, 0.183643324222082,
     -0.835628612410047, 1.59528080213779, 0.329507771815361, -0.820468384118015, 0.487429052428485,
     0.738324705129217, 0.575781351653492, -0.305388387156356, 1.51178116845085, 0.389843236411431,
     -0.621240580541804, -2.2146998871775, 1.12493091814311), .Dim = c(5L, 3L), .Dimnames = list(
     NULL, c("x1", "x2", "x3"))), meta = structure(list(), .Names = character(0), row.names = integer(0), class = "data.frame")),
     keep.org.data = TRUE, pars = list(knn = 3, ndim = 3, get_geod = FALSE))
     19: chckpkg("RSpectra")
     20: stop(paste0("require '", pkg, "' package, install it using install.packages('", pkg,
     "')"))
    
     ══ testthat results ═══════════════════════════════════════════════════════════
     OK: 1018 SKIPPED: 3 FAILED: 1
     1. Error: printing (@test_isomap.R#47)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang

Version: 0.1.3
Check: tests
Result: ERROR
     Running ‘testthat.R’ [38s/41s]
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > library(recipes)
     Loading required package: dplyr
    
     Attaching package: 'dplyr'
    
     The following object is masked from 'package:testthat':
    
     matches
    
     The following objects are masked from 'package:stats':
    
     filter, lag
    
     The following objects are masked from 'package:base':
    
     intersect, setdiff, setequal, union
    
     Loading required package: broom
    
     Attaching package: 'recipes'
    
     The following object is masked from 'package:stats':
    
     step
    
     >
     > test_check(package = "recipes")
     ── 1. Error: printing (@test_isomap.R#47) ─────────────────────────────────────
     require 'RSpectra' package, install it using install.packages('RSpectra')
     1: expect_output(prep(im_rec, training = dat1, verbose = TRUE)) at testthat/test_isomap.R:47
     2: quasi_capture(enquo(object), capture_output, label = label)
     3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
     4: capture_output_lines(code, print, width = width)
     5: eval_with_output(code, print = print, width = width)
     6: withr::with_output_sink(temp, withVisible(code))
     7: force(code)
     8: withVisible(code)
     9: eval_bare(get_expr(quo), get_env(quo))
     10: prep(im_rec, training = dat1, verbose = TRUE)
     11: prep.recipe(im_rec, training = dat1, verbose = TRUE)
     12: prep(x$steps[[i]], training = training, info = x$term_info)
     13: prep.step_isomap(x$steps[[i]], training = training, info = x$term_info)
     14: embed(dimRedData(as.data.frame(training[, col_names, drop = FALSE])), "Isomap", knn = x$options$knn,
     ndim = x$num, .mute = x$options$.mute)
     15: embed(dimRedData(as.data.frame(training[, col_names, drop = FALSE])), "Isomap", knn = x$options$knn,
     ndim = x$num, .mute = x$options$.mute)
     16: .local(.data, ...)
     17: do.call(methodObject@fun, args)
     18: (function (data, pars, keep.org.data = TRUE)
     {
     chckpkg("RSpectra")
     chckpkg("igraph")
     chckpkg("RANN")
     message(Sys.time(), ": Isomap START")
     meta <- data@meta
     orgdata <- if (keep.org.data)
     data@data
     else NULL
     indata <- data@data
     if (is.null(pars$eps))
     pars$eps <- 0
     if (is.null(pars$get_geod))
     pars$get_geod <- FALSE
     message(Sys.time(), ": constructing knn graph")
     knng <- makeKNNgraph(x = indata, k = pars$knn, eps = pars$eps)
     message(Sys.time(), ": calculating geodesic distances")
     geodist <- igraph::distances(knng, algorithm = "dijkstra")
     message(Sys.time(), ": Classical Scaling")
     k <- geodist^2
     k <- .Call(stats:::C_DoubleCentre, k)
     k <- -k/2
     e <- RSpectra::eigs_sym(k, pars$ndim, which = "LA", opts = list(retvec = TRUE))
     e_values <- e$values
     e_vectors <- e$vectors
     neig <- sum(e_values > 0)
     if (neig < pars$ndim) {
     warning("Isomap: eigenvalues < 0, returning less dimensions!")
     e_values <- e_values[seq_len(neig)]
     e_vectors <- e_vectors[, seq_len(neig), drop = FALSE]
     }
     e_vectors <- e_vectors * rep(sqrt(e_values), each = nrow(e_vectors))
     colnames(e_vectors) <- paste("iso", seq_len(neig))
     appl <- function(x) {
     message(Sys.time(), ": L-Isomap embed START")
     appl.meta <- if (inherits(x, "dimRedData"))
     x@meta
     else data.frame()
     indata <- if (inherits(x, "dimRedData"))
     x@data
     else x
     if (ncol(indata) != ncol(data@data))
     stop("x must have the same number of dimensions as the original data")
     nindata <- nrow(indata)
     norg <- nrow(orgdata)
     message(Sys.time(), ": constructing knn graph")
     lknng <- makeKNNgraph(rbind(indata, orgdata), k = pars$knn, eps = pars$eps)
     message(Sys.time(), ": calculating geodesic distances")
     lgeodist <- igraph::distances(lknng, seq_len(nindata), nindata + seq_len(norg))
     message(Sys.time(), ": embedding")
     dammu <- sweep(lgeodist^2, 2, colMeans(geodist^2), "-")
     Lsharp <- sweep(e_vectors, 2, e_values, "/")
     out <- -0.5 * (dammu %*% Lsharp)
     message(Sys.time(), ": DONE")
     return(new("dimRedData", data = out, meta = appl.meta))
     }
     return(new("dimRedResult", data = new("dimRedData", data = e_vectors, meta = meta),
     org.data = orgdata, has.org.data = keep.org.data, apply = appl, has.apply = TRUE,
     method = "Isomap", pars = pars, other.data = if (pars$get_geod) list(geod = as.dist(geodist)) else list()))
     })(data = new("dimRedData", data = structure(c(-0.626453810742332, 0.183643324222082,
     -0.835628612410047, 1.59528080213779, 0.329507771815361, -0.820468384118015, 0.487429052428485,
     0.738324705129217, 0.575781351653492, -0.305388387156356, 1.51178116845085, 0.389843236411431,
     -0.621240580541804, -2.2146998871775, 1.12493091814311), .Dim = c(5L, 3L), .Dimnames = list(
     NULL, c("x1", "x2", "x3"))), meta = structure(list(), .Names = character(0), row.names = integer(0), class = "data.frame")),
     keep.org.data = TRUE, pars = list(knn = 3, ndim = 3, get_geod = FALSE))
     19: chckpkg("RSpectra")
     20: stop(paste0("require '", pkg, "' package, install it using install.packages('", pkg,
     "')"))
    
     ══ testthat results ═══════════════════════════════════════════════════════════
     OK: 1016 SKIPPED: 3 FAILED: 1
     1. Error: printing (@test_isomap.R#47)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc

Version: 0.1.3
Check: tests
Result: ERROR
     Running 'testthat.R' [37s]
    Running the tests in 'tests/testthat.R' failed.
    Complete output:
     > library(testthat)
     > library(recipes)
     Loading required package: dplyr
    
     Attaching package: 'dplyr'
    
     The following object is masked from 'package:testthat':
    
     matches
    
     The following objects are masked from 'package:stats':
    
     filter, lag
    
     The following objects are masked from 'package:base':
    
     intersect, setdiff, setequal, union
    
     Loading required package: broom
    
     Attaching package: 'recipes'
    
     The following object is masked from 'package:stats':
    
     step
    
     >
     > test_check(package = "recipes")
     -- 1. Error: printing (@test_isomap.R#47) -------------------------------------
     require 'RSpectra' package, install it using install.packages('RSpectra')
     1: expect_output(prep(im_rec, training = dat1, verbose = TRUE)) at testthat/test_isomap.R:47
     2: quasi_capture(enquo(object), capture_output, label = label)
     3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
     4: capture_output_lines(code, print, width = width)
     5: eval_with_output(code, print = print, width = width)
     6: withr::with_output_sink(temp, withVisible(code))
     7: force(code)
     8: withVisible(code)
     9: eval_bare(get_expr(quo), get_env(quo))
     10: prep(im_rec, training = dat1, verbose = TRUE)
     11: prep.recipe(im_rec, training = dat1, verbose = TRUE)
     12: prep(x$steps[[i]], training = training, info = x$term_info)
     13: prep.step_isomap(x$steps[[i]], training = training, info = x$term_info)
     14: embed(dimRedData(as.data.frame(training[, col_names, drop = FALSE])), "Isomap", knn = x$options$knn,
     ndim = x$num, .mute = x$options$.mute)
     15: embed(dimRedData(as.data.frame(training[, col_names, drop = FALSE])), "Isomap", knn = x$options$knn,
     ndim = x$num, .mute = x$options$.mute)
     16: .local(.data, ...)
     17: do.call(methodObject@fun, args)
     18: (function (data, pars, keep.org.data = TRUE)
     {
     chckpkg("RSpectra")
     chckpkg("igraph")
     chckpkg("RANN")
     message(Sys.time(), ": Isomap START")
     meta <- data@meta
     orgdata <- if (keep.org.data)
     data@data
     else NULL
     indata <- data@data
     if (is.null(pars$eps))
     pars$eps <- 0
     if (is.null(pars$get_geod))
     pars$get_geod <- FALSE
     message(Sys.time(), ": constructing knn graph")
     knng <- makeKNNgraph(x = indata, k = pars$knn, eps = pars$eps)
     message(Sys.time(), ": calculating geodesic distances")
     geodist <- igraph::distances(knng, algorithm = "dijkstra")
     message(Sys.time(), ": Classical Scaling")
     k <- geodist^2
     k <- .Call(stats:::C_DoubleCentre, k)
     k <- -k/2
     e <- RSpectra::eigs_sym(k, pars$ndim, which = "LA", opts = list(retvec = TRUE))
     e_values <- e$values
     e_vectors <- e$vectors
     neig <- sum(e_values > 0)
     if (neig < pars$ndim) {
     warning("Isomap: eigenvalues < 0, returning less dimensions!")
     e_values <- e_values[seq_len(neig)]
     e_vectors <- e_vectors[, seq_len(neig), drop = FALSE]
     }
     e_vectors <- e_vectors * rep(sqrt(e_values), each = nrow(e_vectors))
     colnames(e_vectors) <- paste("iso", seq_len(neig))
     appl <- function(x) {
     message(Sys.time(), ": L-Isomap embed START")
     appl.meta <- if (inherits(x, "dimRedData"))
     x@meta
     else data.frame()
     indata <- if (inherits(x, "dimRedData"))
     x@data
     else x
     if (ncol(indata) != ncol(data@data))
     stop("x must have the same number of dimensions as the original data")
     nindata <- nrow(indata)
     norg <- nrow(orgdata)
     message(Sys.time(), ": constructing knn graph")
     lknng <- makeKNNgraph(rbind(indata, orgdata), k = pars$knn, eps = pars$eps)
     message(Sys.time(), ": calculating geodesic distances")
     lgeodist <- igraph::distances(lknng, seq_len(nindata), nindata + seq_len(norg))
     message(Sys.time(), ": embedding")
     dammu <- sweep(lgeodist^2, 2, colMeans(geodist^2), "-")
     Lsharp <- sweep(e_vectors, 2, e_values, "/")
     out <- -0.5 * (dammu %*% Lsharp)
     message(Sys.time(), ": DONE")
     return(new("dimRedData", data = out, meta = appl.meta))
     }
     return(new("dimRedResult", data = new("dimRedData", data = e_vectors, meta = meta),
     org.data = orgdata, has.org.data = keep.org.data, apply = appl, has.apply = TRUE,
     method = "Isomap", pars = pars, other.data = if (pars$get_geod) list(geod = as.dist(geodist)) else list()))
     })(data = new("dimRedData", data = structure(c(-0.626453810742332, 0.183643324222082,
     -0.835628612410047, 1.59528080213779, 0.329507771815361, -0.820468384118015, 0.487429052428485,
     0.738324705129217, 0.575781351653492, -0.305388387156356, 1.51178116845085, 0.389843236411431,
     -0.621240580541804, -2.2146998871775, 1.12493091814311), .Dim = c(5L, 3L), .Dimnames = list(
     NULL, c("x1", "x2", "x3"))), meta = structure(list(), .Names = character(0), row.names = integer(0), class = "data.frame")),
     keep.org.data = TRUE, pars = list(knn = 3, ndim = 3, get_geod = FALSE))
     19: chckpkg("RSpectra")
     20: stop(paste0("require '", pkg, "' package, install it using install.packages('", pkg,
     "')"))
    
     == testthat results ===========================================================
     OK: 1016 SKIPPED: 3 FAILED: 1
     1. Error: printing (@test_isomap.R#47)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-devel-windows-ix86+x86_64

Version: 0.1.3
Check: tests
Result: ERROR
     Running ‘testthat.R’ [33s/34s]
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > library(recipes)
     Loading required package: dplyr
    
     Attaching package: 'dplyr'
    
     The following object is masked from 'package:testthat':
    
     matches
    
     The following objects are masked from 'package:stats':
    
     filter, lag
    
     The following objects are masked from 'package:base':
    
     intersect, setdiff, setequal, union
    
     Loading required package: broom
    
     Attaching package: 'recipes'
    
     The following object is masked from 'package:stats':
    
     step
    
     >
     > test_check(package = "recipes")
     ── 1. Error: printing (@test_isomap.R#47) ─────────────────────────────────────
     require 'RSpectra' package, install it using install.packages('RSpectra')
     1: expect_output(prep(im_rec, training = dat1, verbose = TRUE)) at testthat/test_isomap.R:47
     2: quasi_capture(enquo(object), capture_output, label = label)
     3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
     4: capture_output_lines(code, print, width = width)
     5: eval_with_output(code, print = print, width = width)
     6: withr::with_output_sink(temp, withVisible(code))
     7: force(code)
     8: withVisible(code)
     9: eval_bare(get_expr(quo), get_env(quo))
     10: prep(im_rec, training = dat1, verbose = TRUE)
     11: prep.recipe(im_rec, training = dat1, verbose = TRUE)
     12: prep(x$steps[[i]], training = training, info = x$term_info)
     13: prep.step_isomap(x$steps[[i]], training = training, info = x$term_info)
     14: embed(dimRedData(as.data.frame(training[, col_names, drop = FALSE])), "Isomap", knn = x$options$knn,
     ndim = x$num, .mute = x$options$.mute)
     15: embed(dimRedData(as.data.frame(training[, col_names, drop = FALSE])), "Isomap", knn = x$options$knn,
     ndim = x$num, .mute = x$options$.mute)
     16: .local(.data, ...)
     17: do.call(methodObject@fun, args)
     18: (function (data, pars, keep.org.data = TRUE)
     {
     chckpkg("RSpectra")
     chckpkg("igraph")
     chckpkg("RANN")
     message(Sys.time(), ": Isomap START")
     meta <- data@meta
     orgdata <- if (keep.org.data)
     data@data
     else NULL
     indata <- data@data
     if (is.null(pars$eps))
     pars$eps <- 0
     if (is.null(pars$get_geod))
     pars$get_geod <- FALSE
     message(Sys.time(), ": constructing knn graph")
     knng <- makeKNNgraph(x = indata, k = pars$knn, eps = pars$eps)
     message(Sys.time(), ": calculating geodesic distances")
     geodist <- igraph::distances(knng, algorithm = "dijkstra")
     message(Sys.time(), ": Classical Scaling")
     k <- geodist^2
     k <- .Call(stats:::C_DoubleCentre, k)
     k <- -k/2
     e <- RSpectra::eigs_sym(k, pars$ndim, which = "LA", opts = list(retvec = TRUE))
     e_values <- e$values
     e_vectors <- e$vectors
     neig <- sum(e_values > 0)
     if (neig < pars$ndim) {
     warning("Isomap: eigenvalues < 0, returning less dimensions!")
     e_values <- e_values[seq_len(neig)]
     e_vectors <- e_vectors[, seq_len(neig), drop = FALSE]
     }
     e_vectors <- e_vectors * rep(sqrt(e_values), each = nrow(e_vectors))
     colnames(e_vectors) <- paste("iso", seq_len(neig))
     appl <- function(x) {
     message(Sys.time(), ": L-Isomap embed START")
     appl.meta <- if (inherits(x, "dimRedData"))
     x@meta
     else data.frame()
     indata <- if (inherits(x, "dimRedData"))
     x@data
     else x
     if (ncol(indata) != ncol(data@data))
     stop("x must have the same number of dimensions as the original data")
     nindata <- nrow(indata)
     norg <- nrow(orgdata)
     message(Sys.time(), ": constructing knn graph")
     lknng <- makeKNNgraph(rbind(indata, orgdata), k = pars$knn, eps = pars$eps)
     message(Sys.time(), ": calculating geodesic distances")
     lgeodist <- igraph::distances(lknng, seq_len(nindata), nindata + seq_len(norg))
     message(Sys.time(), ": embedding")
     dammu <- sweep(lgeodist^2, 2, colMeans(geodist^2), "-")
     Lsharp <- sweep(e_vectors, 2, e_values, "/")
     out <- -0.5 * (dammu %*% Lsharp)
     message(Sys.time(), ": DONE")
     return(new("dimRedData", data = out, meta = appl.meta))
     }
     return(new("dimRedResult", data = new("dimRedData", data = e_vectors, meta = meta),
     org.data = orgdata, has.org.data = keep.org.data, apply = appl, has.apply = TRUE,
     method = "Isomap", pars = pars, other.data = if (pars$get_geod) list(geod = as.dist(geodist)) else list()))
     })(data = new("dimRedData", data = structure(c(-0.626453810742332, 0.183643324222082,
     -0.835628612410047, 1.59528080213779, 0.329507771815361, -0.820468384118015, 0.487429052428485,
     0.738324705129217, 0.575781351653492, -0.305388387156356, 1.51178116845085, 0.389843236411431,
     -0.621240580541804, -2.2146998871775, 1.12493091814311), .Dim = c(5L, 3L), .Dimnames = list(
     NULL, c("x1", "x2", "x3"))), meta = structure(list(), .Names = character(0), row.names = integer(0), class = "data.frame")),
     keep.org.data = TRUE, pars = list(knn = 3, ndim = 3, get_geod = FALSE))
     19: chckpkg("RSpectra")
     20: stop(paste0("require '", pkg, "' package, install it using install.packages('", pkg,
     "')"))
    
     ══ testthat results ═══════════════════════════════════════════════════════════
     OK: 1016 SKIPPED: 3 FAILED: 1
     1. Error: printing (@test_isomap.R#47)
    
     Error: testthat unit tests failed
     Execution halted
Flavors: r-patched-linux-x86_64, r-release-linux-x86_64

Version: 0.1.3
Check: tests
Result: ERROR
     Running ‘testthat.R’ [47s/48s]
    Running the tests in ‘tests/testthat.R’ failed.
    Complete output:
     > library(testthat)
     > library(recipes)
     Loading required package: dplyr
    
     Attaching package: 'dplyr'
    
     The following object is masked from 'package:testthat':
    
     matches
    
     The following objects are masked from 'package:stats':
    
     filter, lag
    
     The following objects are masked from 'package:base':
    
     intersect, setdiff, setequal, union
    
     Loading required package: broom
    
     Attaching package: 'recipes'
    
     The following object is masked from 'package:stats':
    
     step
    
     >
     > test_check(package = "recipes")
     ── 1. Error: printing (@test_isomap.R#47) ─────────────────────────────────────
     require 'RSpectra' package, install it using install.packages('RSpectra')
     1: expect_output(prep(im_rec, training = dat1, verbose = TRUE)) at testthat/test_isomap.R:47
     2: quasi_capture(enquo(object), capture_output, label = label)
     3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
     4: capture_output_lines(code, print, width = width)
     5: eval_with_output(code, print = print, width = width)
     6: withr::with_output_sink(temp, withVisible(code))
     7: force(code)
     8: withVisible(code)
     9: eval_bare(get_expr(quo), get_env(quo))
     10: prep(im_rec, training = dat1, verbose = TRUE)
     11: prep.recipe(im_rec, training = dat1, verbose = TRUE)
     12: prep(x$steps[[i]], training = training, info = x$term_info)
     13: prep.step_isomap(x$steps[[i]], training = training, info = x$term_info)
     14: embed(dimRedData(as.data.frame(training[, col_names, drop = FALSE])), "Isomap", knn = x$options$knn,
     ndim = x$num, .mute = x$options$.mute)
     15: embed(dimRedData(as.data.frame(training[, col_names, drop = FALSE])), "Isomap", knn = x$options$knn,
     ndim = x$num, .mute = x$options$.mute)
     16: .local(.data, ...)
     17: do.call(methodObject@fun, args)
     18: (function (data, pars, keep.org.data = TRUE)
     {
     chckpkg("RSpectra")
     chckpkg("igraph")
     chckpkg("RANN")
     message(Sys.time(), ": Isomap START")
     meta <- data@meta
     orgdata <- if (keep.org.data)
     data@data
     else NULL
     indata <- data@data
     if (is.null(pars$eps))
     pars$eps <- 0
     if (is.null(pars$get_geod))
     pars$get_geod <- FALSE
     message(Sys.time(), ": constructing knn graph")
     knng <- makeKNNgraph(x = indata, k = pars$knn, eps = pars$eps)
     message(Sys.time(), ": calculating geodesic distances")
     geodist <- igraph::distances(knng, algorithm = "dijkstra")
     message(Sys.time(), ": Classical Scaling")
     k <- geodist^2
     k <- .Call(stats:::C_DoubleCentre, k)
     k <- -k/2
     e <- RSpectra::eigs_sym(k, pars$ndim, which = "LA", opts = list(retvec = TRUE))
     e_values <- e$values
     e_vectors <- e$vectors
     neig <- sum(e_values > 0)
     if (neig < pars$ndim) {
     warning("Isomap: eigenvalues < 0, returning less dimensions!")
     e_values <- e_values[seq_len(neig)]
     e_vectors <- e_vectors[, seq_len(neig), drop = FALSE]
     }
     e_vectors <- e_vectors * rep(sqrt(e_values), each = nrow(e_vectors))
     colnames(e_vectors) <- paste("iso", seq_len(neig))
     appl <- function(x) {
     message(Sys.time(), ": L-Isomap embed START")
     appl.meta <- if (inherits(x, "dimRedData"))
     x@meta
     else data.frame()
     indata <- if (inherits(x, "dimRedData"))
     x@data
     else x
     if (ncol(indata) != ncol(data@data))
     stop("x must have the same number of dimensions as the original data")
     nindata <- nrow(indata)
     norg <- nrow(orgdata)
     message(Sys.time(), ": constructing knn graph")
     lknng <- makeKNNgraph(rbind(indata, orgdata), k = pars$knn, eps = pars$eps)
     message(Sys.time(), ": calculating geodesic distances")
     lgeodist <- igraph::distances(lknng, seq_len(nindata), nindata + seq_len(norg))
     message(Sys.time(), ": embedding")
     dammu <- sweep(lgeodist^2, 2, colMeans(geodist^2), "-")
     Lsharp <- sweep(e_vectors, 2, e_values, "/")
     out <- -0.5 * (dammu %*% Lsharp)
     message(Sys.time(), ": DONE")
     return(new("dimRedData", data = out, meta = appl.meta))
     }
     return(new("dimRedResult", data = new("dimRedData", data = e_vectors, meta = meta),
     org.data = orgdata, has.org.data = keep.org.data, apply = appl, has.apply = TRUE,
     method = "Isomap", pars = pars, other.data = if (pars$get_geod) list(geod = as.dist(geodist)) else list()))
     })(data = new("dimRedData", data = structure(c(-0.626453810742332, 0.183643324222082,
     -0.835628612410047, 1.59528080213779, 0.329507771815361, -0.820468384118015, 0.487429052428485,
     0.738324705129217, 0.575781351653492, -0.305388387156356, 1.51178116845085, 0.389843236411431,
     -0.621240580541804, -2.2146998871775, 1.12493091814311), .Dim = c(5L, 3L), .Dimnames = list(
     NULL, c("x1", "x2", "x3"))), meta = structure(list(), .Names = character(0), row.names = integer(0), class = "data.frame")),
     keep.org.data = TRUE, pars = list(knn = 3, ndim = 3, get_geod = FALSE))
     19: chckpkg("RSpectra")
     20: stop(paste0("require '", pkg, "' package, install it using install.packages('", pkg,
     "')"))
    
     ══ testthat results ═══════════════════════════════════════════════════════════
     OK: 1018 SKIPPED: 3 FAILED: 1
     1. Error: printing (@test_isomap.R#47)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-patched-solaris-x86

Version: 0.1.3
Check: tests
Result: ERROR
     Running 'testthat.R' [32s]
    Running the tests in 'tests/testthat.R' failed.
    Complete output:
     > library(testthat)
     > library(recipes)
     Loading required package: dplyr
    
     Attaching package: 'dplyr'
    
     The following object is masked from 'package:testthat':
    
     matches
    
     The following objects are masked from 'package:stats':
    
     filter, lag
    
     The following objects are masked from 'package:base':
    
     intersect, setdiff, setequal, union
    
     Loading required package: broom
    
     Attaching package: 'recipes'
    
     The following object is masked from 'package:stats':
    
     step
    
     >
     > test_check(package = "recipes")
     -- 1. Error: printing (@test_isomap.R#47) -------------------------------------
     require 'RSpectra' package, install it using install.packages('RSpectra')
     1: expect_output(prep(im_rec, training = dat1, verbose = TRUE)) at testthat/test_isomap.R:47
     2: quasi_capture(enquo(object), capture_output, label = label)
     3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
     4: capture_output_lines(code, print, width = width)
     5: eval_with_output(code, print = print, width = width)
     6: withr::with_output_sink(temp, withVisible(code))
     7: force(code)
     8: withVisible(code)
     9: eval_bare(get_expr(quo), get_env(quo))
     10: prep(im_rec, training = dat1, verbose = TRUE)
     11: prep.recipe(im_rec, training = dat1, verbose = TRUE)
     12: prep(x$steps[[i]], training = training, info = x$term_info)
     13: prep.step_isomap(x$steps[[i]], training = training, info = x$term_info)
     14: embed(dimRedData(as.data.frame(training[, col_names, drop = FALSE])), "Isomap", knn = x$options$knn,
     ndim = x$num, .mute = x$options$.mute)
     15: embed(dimRedData(as.data.frame(training[, col_names, drop = FALSE])), "Isomap", knn = x$options$knn,
     ndim = x$num, .mute = x$options$.mute)
     16: .local(.data, ...)
     17: do.call(methodObject@fun, args)
     18: (function (data, pars, keep.org.data = TRUE)
     {
     chckpkg("RSpectra")
     chckpkg("igraph")
     chckpkg("RANN")
     message(Sys.time(), ": Isomap START")
     meta <- data@meta
     orgdata <- if (keep.org.data)
     data@data
     else NULL
     indata <- data@data
     if (is.null(pars$eps))
     pars$eps <- 0
     if (is.null(pars$get_geod))
     pars$get_geod <- FALSE
     message(Sys.time(), ": constructing knn graph")
     knng <- makeKNNgraph(x = indata, k = pars$knn, eps = pars$eps)
     message(Sys.time(), ": calculating geodesic distances")
     geodist <- igraph::distances(knng, algorithm = "dijkstra")
     message(Sys.time(), ": Classical Scaling")
     k <- geodist^2
     k <- .Call(stats:::C_DoubleCentre, k)
     k <- -k/2
     e <- RSpectra::eigs_sym(k, pars$ndim, which = "LA", opts = list(retvec = TRUE))
     e_values <- e$values
     e_vectors <- e$vectors
     neig <- sum(e_values > 0)
     if (neig < pars$ndim) {
     warning("Isomap: eigenvalues < 0, returning less dimensions!")
     e_values <- e_values[seq_len(neig)]
     e_vectors <- e_vectors[, seq_len(neig), drop = FALSE]
     }
     e_vectors <- e_vectors * rep(sqrt(e_values), each = nrow(e_vectors))
     colnames(e_vectors) <- paste("iso", seq_len(neig))
     appl <- function(x) {
     message(Sys.time(), ": L-Isomap embed START")
     appl.meta <- if (inherits(x, "dimRedData"))
     x@meta
     else data.frame()
     indata <- if (inherits(x, "dimRedData"))
     x@data
     else x
     if (ncol(indata) != ncol(data@data))
     stop("x must have the same number of dimensions as the original data")
     nindata <- nrow(indata)
     norg <- nrow(orgdata)
     message(Sys.time(), ": constructing knn graph")
     lknng <- makeKNNgraph(rbind(indata, orgdata), k = pars$knn, eps = pars$eps)
     message(Sys.time(), ": calculating geodesic distances")
     lgeodist <- igraph::distances(lknng, seq_len(nindata), nindata + seq_len(norg))
     message(Sys.time(), ": embedding")
     dammu <- sweep(lgeodist^2, 2, colMeans(geodist^2), "-")
     Lsharp <- sweep(e_vectors, 2, e_values, "/")
     out <- -0.5 * (dammu %*% Lsharp)
     message(Sys.time(), ": DONE")
     return(new("dimRedData", data = out, meta = appl.meta))
     }
     return(new("dimRedResult", data = new("dimRedData", data = e_vectors, meta = meta),
     org.data = orgdata, has.org.data = keep.org.data, apply = appl, has.apply = TRUE,
     method = "Isomap", pars = pars, other.data = if (pars$get_geod) list(geod = as.dist(geodist)) else list()))
     })(data = new("dimRedData", data = structure(c(-0.626453810742332, 0.183643324222082,
     -0.835628612410047, 1.59528080213779, 0.329507771815361, -0.820468384118015, 0.487429052428485,
     0.738324705129217, 0.575781351653492, -0.305388387156356, 1.51178116845085, 0.389843236411431,
     -0.621240580541804, -2.2146998871775, 1.12493091814311), .Dim = c(5L, 3L), .Dimnames = list(
     NULL, c("x1", "x2", "x3"))), meta = structure(list(), .Names = character(0), row.names = integer(0), class = "data.frame")),
     keep.org.data = TRUE, pars = list(knn = 3, ndim = 3, get_geod = FALSE))
     19: chckpkg("RSpectra")
     20: stop(paste0("require '", pkg, "' package, install it using install.packages('", pkg,
     "')"))
    
     == testthat results ===========================================================
     OK: 1018 SKIPPED: 3 FAILED: 1
     1. Error: printing (@test_isomap.R#47)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-release-windows-ix86+x86_64

Version: 0.1.3
Check: examples
Result: ERROR
    Running examples in 'recipes-Ex.R' failed
    The error most likely occurred in:
    
    > ### Name: step_isomap
    > ### Title: Isomap Embedding
    > ### Aliases: step_isomap tidy.step_isomap
    > ### Keywords: datagen
    >
    > ### ** Examples
    >
    > data(biomass)
    >
    > biomass_tr <- biomass[biomass$dataset == "Training",]
    > biomass_te <- biomass[biomass$dataset == "Testing",]
    >
    > rec <- recipe(HHV ~ carbon + hydrogen + oxygen + nitrogen + sulfur,
    + data = biomass_tr)
    >
    > im_trans <- rec %>%
    + step_YeoJohnson(all_predictors()) %>%
    + step_center(all_predictors()) %>%
    + step_scale(all_predictors()) %>%
    + step_isomap(all_predictors(),
    + options = list(knn = 100),
    + num = 2)
    >
    > im_estimates <- prep(im_trans, training = biomass_tr)
    Error in dimRedMethodList() : could not find function "dimRedMethodList"
    Calls: prep ... embed -> embed -> .local -> match.arg -> eval -> eval
    Execution halted
Flavor: r-oldrel-windows-ix86+x86_64

Version: 0.1.3
Check: tests
Result: ERROR
     Running 'testthat.R' [45s]
    Running the tests in 'tests/testthat.R' failed.
    Complete output:
     > library(testthat)
     > library(recipes)
     Loading required package: dplyr
    
     Attaching package: 'dplyr'
    
     The following object is masked from 'package:testthat':
    
     matches
    
     The following objects are masked from 'package:stats':
    
     filter, lag
    
     The following objects are masked from 'package:base':
    
     intersect, setdiff, setequal, union
    
     Loading required package: broom
    
     Attaching package: 'recipes'
    
     The following object is masked from 'package:stats':
    
     step
    
     >
     > test_check(package = "recipes")
     -- 1. Error: printing (@test_isomap.R#47) -------------------------------------
     require 'RSpectra' package, install it using install.packages('RSpectra')
     1: expect_output(prep(im_rec, training = dat1, verbose = TRUE)) at testthat/test_isomap.R:47
     2: quasi_capture(enquo(object), capture_output, label = label)
     3: capture(act$val <- eval_bare(get_expr(quo), get_env(quo)))
     4: capture_output_lines(code, print, width = width)
     5: eval_with_output(code, print = print, width = width)
     6: withr::with_output_sink(temp, withVisible(code))
     7: force(code)
     8: withVisible(code)
     9: eval_bare(get_expr(quo), get_env(quo))
     10: prep(im_rec, training = dat1, verbose = TRUE)
     11: prep.recipe(im_rec, training = dat1, verbose = TRUE)
     12: prep(x$steps[[i]], training = training, info = x$term_info)
     13: prep.step_isomap(x$steps[[i]], training = training, info = x$term_info)
     14: embed(dimRedData(as.data.frame(training[, col_names, drop = FALSE])), "Isomap", knn = x$options$knn,
     ndim = x$num, .mute = x$options$.mute)
     15: embed(dimRedData(as.data.frame(training[, col_names, drop = FALSE])), "Isomap", knn = x$options$knn,
     ndim = x$num, .mute = x$options$.mute)
     16: .local(.data, ...)
     17: do.call(methodObject@fun, args)
     18: (function (data, pars, keep.org.data = TRUE)
     {
     chckpkg("RSpectra")
     chckpkg("igraph")
     chckpkg("RANN")
     message(Sys.time(), ": Isomap START")
     meta <- data@meta
     orgdata <- if (keep.org.data)
     data@data
     else NULL
     indata <- data@data
     if (is.null(pars$eps))
     pars$eps <- 0
     if (is.null(pars$get_geod))
     pars$get_geod <- FALSE
     message(Sys.time(), ": constructing knn graph")
     knng <- makeKNNgraph(x = indata, k = pars$knn, eps = pars$eps)
     message(Sys.time(), ": calculating geodesic distances")
     geodist <- igraph::distances(knng, algorithm = "dijkstra")
     message(Sys.time(), ": Classical Scaling")
     k <- geodist^2
     k <- .Call(stats:::C_DoubleCentre, k)
     k <- -k/2
     e <- RSpectra::eigs_sym(k, pars$ndim, which = "LA", opts = list(retvec = TRUE))
     e_values <- e$values
     e_vectors <- e$vectors
     neig <- sum(e_values > 0)
     if (neig < pars$ndim) {
     warning("Isomap: eigenvalues < 0, returning less dimensions!")
     e_values <- e_values[seq_len(neig)]
     e_vectors <- e_vectors[, seq_len(neig), drop = FALSE]
     }
     e_vectors <- e_vectors * rep(sqrt(e_values), each = nrow(e_vectors))
     colnames(e_vectors) <- paste("iso", seq_len(neig))
     appl <- function(x) {
     message(Sys.time(), ": L-Isomap embed START")
     appl.meta <- if (inherits(x, "dimRedData"))
     x@meta
     else data.frame()
     indata <- if (inherits(x, "dimRedData"))
     x@data
     else x
     if (ncol(indata) != ncol(data@data))
     stop("x must have the same number of dimensions as the original data")
     nindata <- nrow(indata)
     norg <- nrow(orgdata)
     message(Sys.time(), ": constructing knn graph")
     lknng <- makeKNNgraph(rbind(indata, orgdata), k = pars$knn, eps = pars$eps)
     message(Sys.time(), ": calculating geodesic distances")
     lgeodist <- igraph::distances(lknng, seq_len(nindata), nindata + seq_len(norg))
     message(Sys.time(), ": embedding")
     dammu <- sweep(lgeodist^2, 2, colMeans(geodist^2), "-")
     Lsharp <- sweep(e_vectors, 2, e_values, "/")
     out <- -0.5 * (dammu %*% Lsharp)
     message(Sys.time(), ": DONE")
     return(new("dimRedData", data = out, meta = appl.meta))
     }
     return(new("dimRedResult", data = new("dimRedData", data = e_vectors, meta = meta),
     org.data = orgdata, has.org.data = keep.org.data, apply = appl, has.apply = TRUE,
     method = "Isomap", pars = pars, other.data = if (pars$get_geod) list(geod = as.dist(geodist)) else list()))
     })(data = <S4 object of class structure("dimRedData", package = "dimRed")>, keep.org.data = TRUE,
     pars = structure(list(knn = 3, ndim = 3, get_geod = FALSE), .Names = c("knn",
     "ndim", "get_geod")))
     19: chckpkg("RSpectra")
     20: stop(paste0("require '", pkg, "' package, install it using install.packages('", pkg,
     "')"))
    
     == testthat results ===========================================================
     OK: 1017 SKIPPED: 3 FAILED: 1
     1. Error: printing (@test_isomap.R#47)
    
     Error: testthat unit tests failed
     Execution halted
Flavor: r-oldrel-windows-ix86+x86_64