小编Rog*_*CFA的帖子

Rmarkdown 在 Win 10 机器上不起作用:openBinaryFile:不存在(没有这样的文件或目录)

我无法编织 html、pdf 或 word。每次都出现同样的错误:

"C:/Users/bosr/AppData/Local/Pandoc/pandoc" +RTS -K512m -RTS test.utf8.md --to docx --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash+smart --output test.docx --highlight-style tango 
pandoc.exe: test.utf8.md: openBinaryFile: does not exist (No such file or directory)
Error: pandoc document conversion failed with error 1
Execution halted
Run Code Online (Sandbox Code Playgroud)

我知道有很多这种性质的问题,但我发现没有一个能解决我的问题。

我在没有管理员权限的新 Win 10 机器上安装了 R 3.6.1 和 RStudio 1.2.1578。设法让除 Rmarkdown 之外的一切正常工作。我的 sessionInfo() 在下面。如果我打开命令提示符,可以找到 pandoc:

C:\>pandoc --version
pandoc 2.7.3
Compiled with pandoc-types 1.17.5.4, texmath 0.11.2.2, skylighting 0.8.1
Default user data directory: C:\Users\bosr\AppData\Roaming\pandoc
Copyright (C) 2006-2019 John MacFarlane
Web:  http://pandoc.org
This is free …
Run Code Online (Sandbox Code Playgroud)

windows r pandoc rstudio r-markdown

6
推荐指数
1
解决办法
3310
查看次数

在 data.table 中使用“点点前缀”(..) 时被警告混淆

我想对 data.table 中的一些列求和,在变量中指定这些列。然后我使用..前缀(请参阅新功能data.table1.10.2)来选择这些列。但是,这会导致警告:

mdt <- as.data.table(mtcars)
factorsGEN <- c("disp","hp","drat")
# This works but gives the warning below
mdt[ , score := rowSums(mdt[ , ..factorsGEN])]
#Warning message:
#  In `[.data.table`(mdt, , ..factorsGEN) :
#  Both 'factorsGEN' and '..factorsGEN' exist in calling scope. Please remove 
# the '..factorsGEN' variable in calling scope for clarity.

# This does not work, results in error because factorsGEN is not found
mdt[, score := rowSums(mdt[, factorsGEN])]
Run Code Online (Sandbox Code Playgroud)

我收到一条警告,我不记得我第一次编写代码时收到的警告,所以它可能是更新 data.table 代码的结果。谁能告诉我如何避免警告。我想不通。

r data.table

5
推荐指数
1
解决办法
566
查看次数

标签 统计

r ×2

data.table ×1

pandoc ×1

r-markdown ×1

rstudio ×1

windows ×1