已经下了xlsx和rjava安装包了,java环境也具备了。
我是这样打的
```{r}
plotDATA<-read.xlsx("C:\\plotdata.xlsx",sheetIndex=1)
print(plotDATA)
```
弹出结果是:
The working directory was changed to C:/ inside a notebook chunk. The working directory will be reset when the chunk is finished running. Use the knitr root.dir option in the setup chunk to change the working directory for notebook chunks.
有大佬解读一下嘛,求助ORZ
我升级到RStudio 1.0.44,似乎knitr :: opts_knit $set(root.dir = path)其中path是我的目录不像以前那样工作.它抛出一条消息:
The working directory was changed to /... inside a notebook chunk. The working directory will be reset when the chunk is finished running. Use the knitr root.dir option in the setup chunk to change the the working directory for notebook chunks.
此消息现在将出现在以下每个命令中.请注意,我还没有编织rmd.我只是在运行命令.通过setwd()直接在命令行中设置工作目录会返回getwd()中的正确路径,但是再次加载具有相对路径(./ …)的文件将返回上面的消息. RStudio 0.99.896完全相同的rmd工作正常.我错过了什么?
sessionInfo() R version 3.3.0 (2016-05-03) Platform: x86_64-w64-mingw32/x64 (64-bit) >Running under: Windows 7 x64 (build 7601) Service Pack 1 other attached packages: [1] scales_0.4.0 ggplot2_2.1.0 xtable_1.8-2 data.table_1.9.6 [5] dplyr_0.4.3 knitr_1.15 pander_0.6.0
您可以使用以下命令更改工作目录:
```{r "setup", include=FALSE} knitr::opts_knit$set(root.dir = getwd()) # with something else than `getwd()` ```
如rmarkdown网站dedicated page底部所述.
但重新启动R并运行所有块(可在RStudio的“运行>”选项卡中访问)修复了我的机器上的同样问题.
您好,我是有问必答小助手,您的问题已经有小伙伴解答了,您看下是否解决,可以追评进行沟通哦~
如果有您比较满意的答案 / 帮您提供解决思路的答案,可以点击【采纳】按钮,给回答的小伙伴一些鼓励哦~~
ps:问答VIP仅需29元,即可享受5次/月 有问必答服务,了解详情>>>https://vip.csdn.net/askvip?utm_source=1146287632