Where is the Rserve Config file located on Windows?

后端 未结 4 1675
小鲜肉
小鲜肉 2021-02-11 02:37

I\'m using a Windows 7 x64 machine with R-3.1.0. I installed the Rserve package through Rstudio.

The start of Rserve is successful with the following code in Rstudio:

相关标签:
4条回答
  • 2021-02-11 03:02

    Look in the $RHOME/bin directory

    If you can't find it here is a different way to approach it:

    1. Download Rserve at [http://rforge.net/snapshot/Rserve_.tar.gz], and save it in your desired directory
    2. Run R CMD INSTALL Rserve_.tar.gz

    This allows you to leave Rserve where you want it.

    0 讨论(0)
  • 2021-02-11 03:16

    Rserve does not automatically come with a config file, you must make one. Best steps for doing so:

    1. Navigate to the file where you just installed Rserve.exe (C:\R\R-31~1.0\library\Rserve\libs\x64\R, based on the message you copied here)
    2. Find Rserve.exe, Reserve_d.exe, and Rserve.dll there. Copy these files.
    3. Navigate to where R.dll is on your computer. This is probably C:\Program Files\R\R-3.1.3\bin\x64, but may be different depending on where you installed R to.
    4. Copy the 3 files mentioned above to this location.
    5. Create a text file here named "Rserv.cfg" with the arguments you are looking for, such as port 6312 or library(mvoutlier). Yes, I know that this is different from the documentation, but if you start Rserve_d.exe you will see that this is the file it is looking for. I have not had success naming it anything else.
    0 讨论(0)
  • 2021-02-11 03:17

    After looking at the Rserve source code and making some test I found that on Windows platform Rserve try to load the configuration file from the current working directory. Also pay attention because on Windows the file name is RServ.cfg and not Rserv.conf as documented.

    The current working directory depends of the process, for example using RStudio by default it is your Documents and Settings folder:

    C:\Users\[username]\Documents
    

    but can be changed in the "Global Options" of the IDE

    So you can create an "RServ.cfg" text file in that directory with your needed options and starting RServe in the usual way in RStudio

    Rserve()

    will load your configuration.

    0 讨论(0)
  • 2021-02-11 03:18

    You can start Rserve by specifying the location of the config file. In R instead of just Rserve() try the following:

    Rserve(args="--RS-conf C:\\folder\\Rserv.cfg")
    

    If path is more complicated you need to massage it a little bit:

    Rserve(args="--RS-conf C:\\PROGRA~1\\R\\R-215~1.2\\library\\Rserve\\Rserv.cfg")
    
    0 讨论(0)
提交回复
热议问题