首页 > 解决方案 > Rmd 在编织到 html 时提供未映射的内存

问题描述

我正在运行一个 Rmd 脚本,它通过“网状”结合了 python 和 R 代码。我可以很好地运行整个代码(“重新启动 R 并运行所有块”),但是在编织它时我经常会遇到这个错误,这会阻止我将文件编织到 html

 *** caught segfault ***
address 0xb8, cause 'memory not mapped'
An irrecoverable exception occurred. R is aborting now ...

作为参考,我的针织选项是:

knitr::opts_chunk$set(fig.width  = 12,
                      fig.height = 8,
                      results    = "asis",
                      message    = FALSE,
                      tidy = TRUE,
                      warning    = FALSE
                      )

删除脚本的随机部分,可以是 R 块、Python 块或只是 markdown 文本,有时可以解决问题并编译文档。谁能给我任何关于如何解决这个问题的建议?

运行 python 3.7.1、 rstudio 1.2.502、 r-base 3.5.1

R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS  10.15.5

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /path/to/conda/env/lib/R/lib/libRblas.dylib

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

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

other attached packages:
[1] limma_3.40.0    reticulate_1.15

loaded via a namespace (and not attached):
[1] compiler_3.5.1  Matrix_1.2-18   yaml_2.2.1      Rcpp_1.0.4.6    grid_3.5.1      knitr_1.28      jsonlite_1.6.1  xfun_0.13       lattice_0.20-41

标签: rknitr

解决方案


推荐阅读