我想在RStudio云上使用reprex
reprex手册上说:
当剪贴板在结构上不可用时(例如,在
服务器或RStudio云上),reprex()将参考当前选择而不是剪贴板
但是,当我在RStudio云上的脚本中选择我的代码并在控制台中键入reprex::reprex()时,我会得到以下消息:
No user-supplied code found … so we’ve made some up. You’re welcome!
``` rsprintf(“快乐%s!",平日(Sys.Date()
#> 1“星期四快乐!”
<sup>Created on 2021-03-18 by the [reprex package](https://reprex.tidyverse.org) (v1.0.0)</sup>Update1:如果我将代码复制到剪贴板并/或选择脚本,则控制台中会出现以下错误:
> reprex::reprex()
! No input provided and clipboard is not available.发布于 2021-03-20 15:53:21
这个问题得到了https://github.com/tidyverse/reprex/issues/369#issuecomment-803229938的善意回答。
--这是dev reprex的一个特性,所以它还没有出现在CRAN上。因此,我怀疑这是一个版本问题。( pkgdown站点反映了开发功能。)
我很快就会向CRAN reprex发布这些特性。。
https://stackoverflow.com/questions/66695915
复制相似问题