1.4.2.1 About Oracle Machine Learning for R Data Types and Classes
OML4R has data types that map R data types to SQL data types.
In an R session, when you create database objects from R objects or you create R objects from database data, OML4R translates R data types to SQL data types and the reverse where possible.
OML4R creates objects that are instances of OML4R classes. OML4R overloads many standard R functions so that they use OML4R classes and data types. R language constructs and syntax are supported for objects that are mapped to Oracle Database objects.
Table 1-1 Mappings Between R, OML4R, and SQL Data Types
| R Data Type | OML4R Data Type | SQL Data Type |
|---|---|---|
|
character mode |
|
|
|
integer mode |
|
|
|
logical mode |
|
The |
|
numeric mode |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
None |
Not supported |
User defined data types Reference data types |
Note:
-
Objects of type
ore.datetimedo not support a time zone setting, instead they use the system time zoneSys.timezoneif it is available or GMT ifSys.timezoneis not available. -
The SQL VARCHAR2 data type is mapped to the R character data type through the embedded R input data argument. Users can convert the character variable to a factor in R if needed by using
as.factor().