Hi Friends, I am working on R-2.9.0 and i want to connect oracle through R, but i could not find ROracle (zip file for windows) on CRAN Packages. Can anyone suggest me how to connect Oracle from R in windows platform? I would be grateful if u can provide me code aswell. Thanks & Regards, Madan -- View this message in context: http://www.nabble.com/R-connectivity-with-Oracle-DB-tp23758768p23758768.html Sent from the R help mailing list archive at Nabble.com.
See http://cran.r-project.org/bin/windows/contrib/2.9/@ReadMe (ReadMe files are there to be read!) and consider the use of RODBC, which is used by lots of Oracle users as an R client on Windows. On Thu, 28 May 2009, Madan Mohan wrote:> > Hi Friends, > > I am working on R-2.9.0 and i want to connect oracle through R, but i could > not find ROracle (zip file for windows) on CRAN Packages. Can anyone suggest > me how to connect Oracle from R in windows platform? I would be grateful if > u can provide me code aswell. > > Thanks & Regards, > Madan-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
On 28/05/2009 6:03 AM, Madan Mohan wrote:> Hi Friends, > > I am working on R-2.9.0 and i want to connect oracle through R, but i could > not find ROracle (zip file for windows) on CRAN Packages. Can anyone suggest > me how to connect Oracle from R in windows platform? I would be grateful if > u can provide me code aswell.Get an ODBC driver from Oracle, and use RODBC. Duncan Murdoch
Hello Madan, I am rather novice as well, so I went the ODBC way. If you define an ODBC connection to Oracle, with System DSN dsn-name, the code to get the results of a query into, say, mydata is like : library(RODBC) # First of all channel <- odbcConnect("dsn-name", uid="someuser") # double quotes required, it will ask for the password # Return rows from an SQL query mydata <- sqlQuery (channel, "Select .... put your query here ...") # same as before odbcClose(channel) # When you're done HTH, Gabriele Franzini ICT Applications Manager Nerviano Medical Sciences SRL Nerviano Italy