Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set the Rstudio files pane directory from the R console?

Tags:

r

rstudio

Is there any interaction from R to RStudio possible?

I would really like, for example, to set the RStudio files pane directory from the R console, like setFilesPane(getwd()) or such. I haven't found anything though.

Edit: To clarify: In RStudio there is a "files pane" (bottom right)

enter image description here

This can be navigated like any file explorer. However I would like to set the files pane directory (the directory whose contents are shown in the files pane) from my R code instead of having to navigate to my project folder by hand every time. Is there any way to do this?

like image 771
meow Avatar asked Oct 28 '25 09:10

meow


2 Answers

rstudioapi::filesPaneNavigate() ought to do what you're looking for.

like image 54
RoyalTS Avatar answered Oct 31 '25 13:10

RoyalTS


Was answered by @docendodiscimus:

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

like image 36
meow Avatar answered Oct 31 '25 12:10

meow



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!