topepo / caret

caret (Classification And Regression Training) R package that contains misc functions for training and plotting classification and regression models
http://topepo.github.io/caret/index.html
1.62k stars 632 forks source link

Error creating epub of caret book #957

Closed fahadshery closed 5 years ago

fahadshery commented 5 years ago

Hi,

I am trying to create a epub version of your book on caret by: bookdown::render_book("index.Rmd","bookdown::epub_book")

It is throwing the following error: `Quitting from lines 1732-1752 (_main.Rmd) Error in structure(x, class = unique(c("AsIs", oldClass(x)))) : seek failed on /Users/Fahad/Documents/R Projects/bookdown/caret/bookdown/_main_cache/epub3/samp_outside_res_08098462181d1619cd07f1c8b7742300.rdb In addition: There were 23 warnings (use warnings() to see them)

Please delete _main.Rmd after you finish debugging the error.`

Here is the R Session info:

`> sessionInfo() R version 3.5.1 (2018-07-02) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS 10.14

Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale: [1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages: [1] parallel grid stats graphics grDevices utils datasets methods base

other attached packages: [1] recipes_0.1.3 broom_0.5.0 dplyr_0.7.7
[4] doMC_1.3.5 iterators_1.0.10 foreach_1.4.4
[7] e1071_1.7-0 ipred_0.9-7 randomForest_4.6-14
[10] ROSE_0.0-3 DMwR_0.4.1 heatmaply_0.15.2
[13] viridis_0.5.1 viridisLite_0.3.0 plotly_4.8.0
[16] networkD3_0.4 proxy_0.4-22 DT_0.4
[19] plyr_1.8.4 pROC_1.13.0 kernlab_0.9-27
[22] klaR_0.6-14 MASS_7.3-50 gbm_2.1.4
[25] latticeExtra_0.6-28 RColorBrewer_1.1-2 ggthemes_4.0.1
[28] earth_4.6.3 plotmo_3.5.0 TeachingDemos_2.10
[31] plotrix_3.7-4 mlbench_2.1-1 AppliedPredictiveModeling_1.1-7 [34] knitr_1.20 caret_6.0-80 ggplot2_3.0.0
[37] lattice_0.20-35 bookdown_0.7.21

loaded via a namespace (and not attached): [1] backports_1.1.2 igraph_1.2.2 lazyeval_0.2.1 splines_3.5.1 crosstalk_1.0.0
[6] digest_0.6.18 htmltools_0.3.6 gdata_2.18.0 magrittr_1.5 cluster_2.0.7-1
[11] ROCR_1.0-7 gclus_1.3.1 sfsmisc_1.1-2 gower_0.1.2 dimRed_0.1.0
[16] xts_0.11-1 colorspace_1.3-2 xfun_0.4 crayon_1.3.4 jsonlite_1.5
[21] bindr_0.1.1 zoo_1.8-4 survival_2.42-3 glue_1.3.0 DRR_0.0.3
[26] registry_0.5 gtable_0.2.0 webshot_0.5.1 questionr_0.6.3 ddalpha_1.3.4
[31] quantmod_0.4-13 prabclus_2.2-6 DEoptimR_1.0-8 abind_1.4-5 scales_1.0.0
[36] mvtnorm_1.0-8 miniUI_0.1.1.1 Rcpp_0.12.19 CORElearn_1.53.1 xtable_1.8-3
[41] magic_1.5-9 mclust_5.4.1 stats4_3.5.1 lava_1.6.3 prodlim_2018.04.18 [46] htmlwidgets_1.3 httr_1.3.1 gplots_3.0.1 fpc_2.1-11.1 modeltools_0.2-22
[51] pkgconfig_2.0.2 flexmix_2.3-14 nnet_7.3-12 tidyselect_0.2.5 labeling_0.3
[56] rlang_0.3.0.1 reshape2_1.4.3 later_0.7.5 munsell_0.5.0 tools_3.5.1
[61] pls_2.7-0 evaluate_0.12 geometry_0.3-6 stringr_1.3.1 yaml_2.2.0
[66] ModelMetrics_1.2.0 robustbase_0.93-3 caTools_1.17.1.1 purrr_0.2.5 dendextend_1.9.0
[71] bindrcpp_0.2.2 nlme_3.1-137 whisker_0.3-2 mime_0.6 RcppRoll_0.3.0
[76] compiler_3.5.1 rstudioapi_0.8 curl_3.2 tibble_1.4.2 stringi_1.2.4
[81] highr_0.7 trimcluster_0.1-2.1 Matrix_1.2-14 pillar_1.3.0 combinat_0.0-8
[86] bitops_1.0-6 data.table_1.11.8 seriation_1.2-3 httpuv_1.4.5 R6_2.3.0
[91] promises_1.0.1 TSP_1.1-6 KernSmooth_2.23-15 gridExtra_2.3 codetools_0.2-15
[96] gtools_3.8.1 assertthat_0.2.0 CVST_0.2-2 rprojroot_1.3-2 withr_2.1.2
[101] diptest_0.75-7 rpart_4.1-13 timeDate_3043.102 tidyr_0.8.1 class_7.3-14
[106] rmarkdown_1.10 TTR_0.23-4 shiny_1.0.5 lubridate_1.7.4 ellipse_0.4.1
Warning messages: 1: In get(results[[i]], pos = which(search() == packages[[i]])) : restarting interrupted promise evaluation 2: In get(results[[i]], pos = which(search() == packages[[i]])) : restarting interrupted promise evaluation 3: In get(results[[i]], pos = which(search() == packages[[i]])) : restarting interrupted promise evaluation 4: In get(results[[i]], pos = which(search() == packages[[i]])) : restarting interrupted promise evaluation`

fahadshery commented 5 years ago

Here is the traceback:

> traceback() 17: structure(x, class = unique(c("AsIs", oldClass(x)))) 16: I(round(outside_test["original", "ROC"], 3)) 15: eval(parse_only(code), envir = envir) 14: eval(parse_only(code), envir = envir) 13: withVisible(eval(parse_only(code), envir = envir)) 12: hook_eval(code[i], envir) 11: inline_exec(block) 10: in_dir(input_dir(), inline_exec(block)) 9: call_inline(x) 8: process_group.inline(group) 7: process_group(group) 6: 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"), ") ") }) 5: process_file(text, output) 4: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet, encoding = encoding) 3: rmarkdown::render(main, output_format, ..., clean = clean, envir = envir, encoding = "UTF-8") 2: render_cur_session(files, main, config, output_format, clean, envir, ...) 1: bookdown::render_book("index.Rmd", "bookdown::epub_book") Warning message: In get(results[[i]], pos = which(search() == packages[[i]])) : restarting interrupted promise evaluation

topepo commented 5 years ago

Did you compile it using the make_files.R file?

One issue with compiling to epub is that there is a lot of html related stuff in the files. This is the reason that I don't compile to LaTeX.

Honestly, the only other thing that I can think to tell you is to update all of the related packages and try again. I'm about to do another release, so I'll let you know whether I encounter the same issue when I make the new version of the documents.