【问题标题】:object 'C_stri_join' not found - Using knitr in Rstudio找不到对象'C_stri_join' - 在 Rstudio 中使用 knitr
【发布时间】:2015-10-23 15:50:20
【问题描述】:

在 Rstudio 中使用 knit 按钮时,我收到错误 object 'C_stri_join' not found

这是一个例子:

---
title: "Sample Document"
output:
   html_document:
   toc: true
   theme: united
---

<!--
%\VignetteEngine{knitr::knitr}
%\VignetteIndexEntry{Basic test}
-->

Here we go

```{r}
x <- 1

str(x)
```

错误如下:

Error in stri_c(..., sep = sep, collapse = collapse, ignore_null = TRUE) : 
  object 'C_stri_join' not found
Calls: suppressPackageStartupMessages ... evaluate_call -> handle_output -> <Anonymous> -> str_c -> stri_c

这是在我最近更新了我的 R 包之后发生的:

> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United Kingdom.1252 
[2] LC_CTYPE=English_United Kingdom.1252   
[3] LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C                           
[5] LC_TIME=English_United Kingdom.1252    

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

loaded via a namespace (and not attached):
[1] htmltools_0.2.6 tools_3.2.2     yaml_2.1.13     rmarkdown_0.8.1
[5] digest_0.6.8   

该错误似乎源于在 R 代码块中对 str 的调用,因为以下操作没有错误:

---
title: "Sample Document"
output:
  html_document:
    toc: true
    theme: united
---

<!--
%\VignetteEngine{knitr::knitr}
%\VignetteIndexEntry{Basic test}
-->

Here we go

```{r}
x <- 1

# str(x)
```

这与this issue 类似,但此处提供的细节很少。

【问题讨论】:

  • 为我工作,你是否像易辉建议的那样重新安装了 stringi?

标签: r rstudio knitr stringi


【解决方案1】:

只需重新安装 stringi 包即可解决此问题。

【讨论】:

  • 对我来说,重新安装 srtingi 并没有解决问题。这个问题不仅发生在 knitr 上,还发生在许多其他包上,例如 latex2exp 或 latex2exp
猜你喜欢
  • 1970-01-01
  • 2021-08-14
  • 1970-01-01
  • 1970-01-01
  • 2016-11-28
  • 2017-11-08
  • 2014-09-16
相关资源
最近更新 更多