2
在Rstudio中使用針織按鈕時,出現錯誤object 'C_stri_join' not found
。找不到對象'C_stri_join' - 在Rstudio中使用knitr
下面是一個例子:
---
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類似,但在那裏給出了一些細節。
適合我,你有沒有重新安裝像iihui建議的stringi? – rawr