Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

Automatically setting the default working directory is a bit different in Revolution R than it is in CRAN-R. Because the Revolution IDE has its own startup and initialization sequence, you need to set any R commands you want to use in a .First function that is called in a local .Rprofile on startup.

The contents of this .First function might look as follows:

User-specific .Rprofile:

.First <- function(){
   rCodeDir <<- "C:/MyRdir"
   setwd(rCodeDir)
   source("C:/MyRdir/startup.R")
   cat("\nWelcome at", date(), "\n")



Here the file 'startup.R' is a further R script that contains the following commands:

library(nws)
library(KernSmooth)

 

The steps to create this kind of configuration are the following:

1). Using 'Notepad' or your favorite editor, create a file named .Rprofile with the above content.
    (Note that this file begins with a 'period' in the name and DOES NOT have a file extension)
    If you are using Notepad choose 'File ---> Save As'. As the 'File Type' select 'All Files'(*.*).
    Do not save the file with a (*.txt) file extension).

   Save this file into the directory 'C:\MyRdir'.

   Also save the file 'startup.R' with the above contents in this same folder.
  

2).  Launch Revolution R Enterprise. After opening the program, goto 'Tools ---> Options ---> Revolution RPE Options --> Load last solution at startup'
      and verify that it is set to 'False'. Change it if it is set to 'True'.
      Also verify that the option 'Automatically run .Rprofile' is set to 'True'. Change it if it is set to 'False'.

 
3).  Create a Windows icon shortcut on your desktop to:

      C:\Revolution\R-Enterprise-7.0\IDE64\RevoIDE.exe


4).  Create a directory on your computer that contains the .Rprofile file, let's say:

      C:\MyRdir


5).  Edit the properties of the Windows icon shortcut. Change the 'Start in:' field of the shortcut
     so it says:   C:\MyRdir

     Click 'Apply' and 'OK' to change the shortcut settings.


6). Double-click the shortcut to launch Revolution R Enterprise in the future.
     All your startup settings should be applied and the default working directory should now be changed.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×