Set up an OTP instance.
OTP is run in Java and requires Java commands to be typed into the command line. The function allows the parameters to be defined in R and automatically passed to Java. This function sets up a local instance of OTP, for remote versions see documentation.
The function assumes you have run otp_build_graph()
otp_setup( otp = NULL, dir = NULL, memory = 2048, router = "default", port = 8080, securePort = 8081, analyst = FALSE, wait = TRUE )
otp |
A character string, path to the OTP .jar file |
dir |
A character string, path to a directory containing the necessary files, see details |
memory |
A positive integer. Amount of memory to assign to the OTP in MB, default is 2048 |
router |
A character for the name of the router to use, must be subfolder of dir/graphs, default "default". See vignettes for details. |
port |
A positive integer. Optional, default is 8080. |
securePort |
A positive integer. Optional, default is 8081. |
analyst |
Logical. Should the analyst features be loaded? Default FALSE |
wait |
Logical, Should R wait until OTP has loaded before running next line of code, default TRUE |
To run an OTP graph must have been created using otp_build_graph and the following files to be in the directory specified by the dir variable.
/graphs - A sub-directory
/default - A sub-directory with the name of the OTP router used in 'router' variable
graph.obj OTP graph
This function does not return a value to R. If wait is TRUE R will wait until OTP is running (maximum of 5 minutes). After 5 minutes (or if wait is FALSE) the function will return R to your control, but the OTP will keep loading.
Other setup:
otp_build_graph(),
otp_check_java(),
otp_dl_demo(),
otp_dl_jar(),
otp_make_config(),
otp_stop(),
otp_validate_config(),
otp_write_config()
## Not run: otp_setup( otp = "C:/otp/otp.jar", dir = "C:/data" ) otp_setup( otp = "C:/otp/otp.jar", dir = "C:/data", memory = 5000, analyst = TRUE ) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.