从 R 控制台设置 Rstudio 文件窗格目录?

Set the Rstudio files pane directory from the R console?

是否可以从 R 到 RStudio 进行任何交互?

例如,我真的很想从 R 控制台设置 RStudio 文件窗格目录,例如 setFilesPane(getwd()) 等。不过我还没有找到任何东西。

编辑:澄清一下: 在 RStudio 中有一个 "files pane"(右下角)

这可以像任何文件资源管理器一样进行导航。但是,我想从我的 R 代码中设置文件窗格目录(其内容显示在文件窗格中的目录),而不必每次都手动导航到我的项目文件夹。有什么办法吗?

@docendodiscimus 回答:

click the arrow at the top of the console pane (bottom left) Thanks!

rstudioapi::filesPaneNavigate() 应该能满足您的需求。