0

I've been running R for several years on Windows. I am now beginning to work with R on Ubuntu running on the cloud.

How do I set the R start-up directory on Ubuntu? This is the directory where the .RProfile file resides.

In Windows I edit the desktop icon where there is a field called 'Start in:'. There is no desktop on my Ubuntu cloud instance, so I'm flat out stumped as to how to accomplish this simple step.

As I am a Linux and Ubuntu beginner, please make your answer as newbie-friendly as possible. Thanks.

Argent
  • 885
  • 2
  • 9
  • 18
  • In my experience it is dependent on how to start R. If you click on an `.R`-file, to open R, that file's directory become the _starting directory_. If start R from the terminal R start up in that directory. you can investigae this by running `getwd()` when you start R. I normally have a `setwd(...)` at the top of most of my R programs. Hope that helps. If you are looking to _locate the_ `.Rprofile` _file generating default options_ you could take a look at [this SO answer](https://stackoverflow.com/a/13736073/1305688). – Eric Fail Oct 18 '17 at 13:40
  • @EricFail My model is that when an interactive session of R starts, by entering R at the command line, it goes to a start directory where it runs .RProfile. Once .RProfile completes its work then the interactive session begins in a directory determined by the .RProfile file (or by a file invoked by the .RProfile file). I did check the link you supplied. It appears I may need to learn how to set environment variables on Linux. I am also going to check the R Installation and Administration manual. – Argent Oct 18 '17 at 14:04

0 Answers0