4.4 Verify the OML4R Server Installation

To verify the success of an OML4R Server installation, you can view the log files created by the spool command above and run the following commands.

For any installation, you can run some functions to verify a successful installation.

Example 4-1 Run Examples to Verify the Server Installation

First run these commands from an R instance directly on the database server and then run them from the OML4R client.

Start R using the ORE script and load the ORE library.

$ ORE
> library(ORE)

Connect to the server. This example connects as the user OMLUSER.

ore.connect("RQUSER", password="RQUSER", service_name="ORCLPDB", 
host="<host name>", all=TRUE)

Run some functions.

## Is the OML4R client connected to the OML4R server?
## The output of this function should be TRUE.
ore.is.connected()

## List the available database tables.
ore.ls()

## Push an R dataframe to a database table.
df <- data.frame(a="abc",
                b=1.456,
                c=TRUE,
                d=as.integer(1))
of <- ore.push(df)

## Run the self-contained example code in the help files associated with the following functions.
## The examples should not return any errors.
example("ore.odmAI")     ## Builds an OML4SQL attribute importance model.
example("ore.doEval")    ## Runs an embedded R execution function.