【发布时间】:2015-07-08 06:57:02
【问题描述】:
我搞砸了一些东西,但我不知道去哪里找。我的猜测是当我更新emacs 中的一些包时发生了一些事情,但我不知道到底是哪一个。任何帮助将不胜感激即使运行如下基本命令:
\begin{document}
<<test>>=
1+1
@
\end{document}
产生以下错误
label: test
Quitting from lines 39-40 (/tmp/tmp.rnw)
Error in data.frame(..., check.names = FALSE) :
arguments imply differing number of rows: 3, 0
In addition: Warning messages:
1: In is.na(res[, 1]) :
is.na() applied to non-(list or vector) of type 'NULL'
2: In is.na(res) : is.na() applied to non-(list or vector) of type 'NULL'
这是堆栈跟踪:
+ Error in data.frame(..., check.names = FALSE) :
arguments imply differing number of rows: 3, 0
----------------------------------
22: stop(gettextf("arguments imply differing number of rows: %s",
paste(unique(nrows), collapse = ", ")), domain = NA)
21: data.frame(..., check.names = FALSE)
20: cbind(deparse.level, ...)
19: cbind(z[, c("line1", "col1", "line2", "col2", "text")], merge_cmd(z,
markup))
18: (if (fallback) hi_naive else hilight_one)(code, format, markup,
escape_fun)
17: highr::hilight(x, format, prompt = options$prompt, markup = opts$markup)
16: hilight_source(x, "latex", options)
15: (knit_hooks$get("source"))(src, options)
14: wrap.source(X[[1L]], ...)
13: FUN(X[[1L]], ...)
12: lapply(x, wrap, options)
11: wrap.list(res, options)
10: wrap(res, options)
9: unlist(wrap(res, options))
8: block_exec(params)
7: call_block(x)
6: process_group.block(group)
5: process_group(group)
4: 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"),
") ")
})
3: process_file(text, output)
2: knit(input, output = output, envir = envir, quiet = quiet, encoding = encoding)
1: knit2pdf("tmp.rnw")
更新
## R version 3.1.2 (2014-10-31)
## Platform: x86_64-redhat-linux-gnu (64-bit)
## locale:
## [1] LC_CTYPE=en_US.utf8 LC_NUMERIC=C
## [3] LC_TIME=en_US.utf8 LC_COLLATE=en_US.utf8
## [5] LC_MONETARY=en_US.utf8 LC_MESSAGES=en_US.utf8
## [7] LC_PAPER=en_US.utf8 LC_NAME=C
## [9] LC_ADDRESS=C LC_TELEPHONE=C
## [11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
## other attached packages:
## [1] knitr_1.10.5
## loaded via a namespace (and not attached):
## [1] compiler_3.1.2 evaluate_0.7 formatR_1.2 highr_0.5 stringr_1.0.0
## [6] tcltk_3.1.2 tools_3.1.2
【问题讨论】:
-
sessionInfo()?所有软件包都是最新的吗? -
@Yihui 我已经更新了内置包并将我的 sessionInfo() 放在上面。但问题仍然存在。你有没有导致问题?
-
@Yihui 更新软件包并重新启动会话解决了问题。非常感谢。