rOpenserver package
The goal of rOpenserver
is providing an R interface to Petex
(Petroleum Experts) applications Prosper, GAP and MBAL to perform
automated tasks, generate datasets for statistical analysis, and
advanced fine control of solvers and calculations.
Installation
rOpenserver
is not in CRAN yet but in
the meantime, you can install it from GtiHub using the devtools
package, from the rOpenserver
repository with:
install.packages("devtools")
devtools::install_github("f0nzie/rOpenserver", dependencies = TRUE)
The argument dependencies
has the role of downloading and installing
packages that are key for rOpenserver, such as R6
and RDCOMClient
.
If you want to install RDCOMClient
separately you could install it
from its repository via devtools
as well. Then after you could proceed
to install rOpenServer
.
devtools::install_github("omegahat/RDCOMClient")
Indicating files and folders
In R, as in Python or any other programming languages, there are some conventions to deal with the filenames and folder or directories. In Windows, we should use a double-backslash to separate the paths. In Unix operating systems, like Linux and MacOS, we use a single slash.
For instance, in the following example, we set the folder where
typically the Prosper examples are. Then , we use slash /
or the
double-backslash \\
to separate the folder names, otherwise you will
get error. We use both ways in the following two code blocks.
# point to the well model
prosper_folder = "C:/Program Files (x86)/Petroleum Experts/IPM 10/Samples/prosper"
model_file <- "T00_Integrated_Oil_Well.Out"
model_filename <- file.path(prosper_folder, model_file)
file.exists(model_filename)
#> [1] TRUE