Oracle Advanced Analytics provides multiple language (SQL, R and if we include GUIs, Oracle Data Miner workflow UI) support to the in-DB analytics. Using SQL, R or the ODM'r GUI, you can access a library of simple descriptive, summary and coparative statistics that have been implemented in the Oracle Database + a dozen hi-perf in-DB data mining algorithms (e.g. regression, decision trees, text mining, clustering, associations, anomaly detection, etc.) and solve a wide range of business and technical problems.
Should you require additional techniques e.g. R CRAN packages, then Oracle Advanced Analytics supports that through R to SQL transparancy where it "pushes down" R language intentions to matching in-DB SQL functions e.g. ETL, stats and data mining OR it can make a callout to R via "embedded R mode" and have the Database manage the flow of data and the process.
There is an OTN Discussion Forum that focuses entirely on the "R" aspects of the Oracle Advanced Analytics Option. I suggest that you re-post your questiion here R for additional discusssions and for the benefit of that Oracle Advanced Analytics/Oracle R Enterprise OTN forum/community.
You should be able to do it with embedded R. For more info take a look at our training material on [url http://www.oracle.com/technetwork/database/options/advanced-analytics/r-enterprise/ore-trng4-embeddedrscripts-1501638.pdf]embedded R scripts.