如何创建 R 脚本来运行位于特定文件夹中的 R 脚本?
我正在使用 RStudio(操作系统:Windows 10),并且我的 C 驱动器上的特定文件夹中有大约 10 个 R 脚本。
我正在寻找一个 R 脚本,它可以依次执行文件夹中的这些 R 脚本(不是并行)。
另外,我需要 RScript 在 RStudio 中运行,而不是在命令提示符窗口中运行。
其他信息:
R 脚本位置:C:\myfiles\R\Rscripts 该文件夹中的 RScript 列表(显示摘录):
08dec22-15dec22.R
21jan22-27jan22.R
10feb23-17feb23.R
...
我检查了此处提供的答案,但我不知道如何根据我的需要自定义它们: 运行 R 脚本文件夹,每个脚本位于一个不同的 R 实例
任何帮助将不胜感激。
I am using RStudio (OS: Windows 10) and I have around 10 R scripts located in a specific folder on my C drive.
I am looking for an R Script that can execute those R Scripts in the folder one after the other (not in parallel).
Also, I need the RScripts to run in RStudio and not in a Command Prompt Window.
Additional info:
R scripts location: C:\myfiles\R\Rscripts
List of RScripts in that folder (extract shown):
08dec22-15dec22.R
21jan22-27jan22.R
10feb23-17feb23.R
...
I checked the answers provided here but I cannot figure out how to customize them for my needs: Running a Folder of R Scripts, each in a different R instance
Any help would be much appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论