无法在Linux上生成reprex。当我尝试一个简单的例子时
(y <- 1:4)
mean(y)我收到以下消息
No input provided and clipboard is not available.
Rendering reprex...
Clipboard on X11 requires 'xclip' (recommended) or 'xsel'.
Unable to put result on the clipboard. How to get it:
* Capture what `reprex()` returns.
* Consult the output file. Control via `outfile` argument.
Path to `outfile`:
* /tmp/RtmpRYA93G/reprex16f2e48b49ed7/reprex_reprex.md
Open the output file for manual copy?
1: yes
2: no并在我的查看器中显示以下输出
No user-supplied code found … so we’ve made some up. You’re welcome!
sprintf("Happy %s!", weekdays(Sys.Date()))
#> [1] "Happy Friday!"
Created on 2020-10-16 by the reprex package (v0.3.0.9001)这是Linux上的剪贴板问题吗?谢谢你的帮助。
发布于 2020-10-17 09:09:21
剪贴板在Linux上通常是不可用的,如果用户想要运行reprex,他们必须安装xclip。另一种选择是不使用剪贴板,就像MrFlick先生的评论中建议的那样
reprex::reprex({(y <- 1:4); mean(y)})https://stackoverflow.com/questions/64380485
复制相似问题