R_HOME (directory of R installation)
R_LIBS_USER (preferred user library directory)
> install.packages(c("Rserve","sp","maptools","rgdal",
"spatstat","gstat","automap"))
.First <- function() {
#the following libraries will be loaded on R start-up:
library(sp)
library(gstat)
library(rgdal)
library(spatstat)
library(maptools)
library(automap)
#specify the R work directory here:
setwd(“<R WD>”)
}
Please refer the official website for detailed up-to-date information
about Rserve: http://www.rforge.net/Rserve/. You can start Rserve
from within R by the following commands:
> library(Rserve)
> Rserve()
Since Rserve was installed from within R, it should be located under
%R_LIBS_USER%/Rserve
Windows:
According to the website, you have to put the Rserve binaries in the
directory were file "R.dll" is located. That's usually something like
%R_HOME%\bin\i386"
.
There are alternatives to make Rserve work
under windows, but full functionality is not guaranteed: Add the locations
of Rserve and R.dll to the environment variable "path" or start Rserve with
a batch file of the following content. Eventually have to modify the
paths.
CD "%R_HOME%\bin\i386"
START "Rserve" "%R_LIBS_USER%\Rserve\Rserve.exe"
Create a file called “Rserv.cfg” and place it into the directory of the Rserve binaries. Customize the following settings; they suit for running the R backend from remote connection and with user authentication. For details and more parameters refer the Rserve-documentation.
pwdfile c:/pwd.txt
remote enable
auth required
port 6312
encoding utf8
The password file should be an ASCII file with-line-per-line user entries of format. It should be declared by an absolute path because relative paths refer to the R workdirectory. The filename is regardless.
user password
(URL: http://< Host>:< Port>/wps/webAdmin/index.jsp with e.g. host localhost, port 8080, user=wps, password=wps)
Rserve_Host (default: localhost)
Rserve_Port (default: 6311)
Rserve_User
Rserve_Password
Figure 1: Repository entry for R backend, displays how to add properties
according to the Rserve configuration