Re: [R] odbcConnectAccess function

2009-05-04 Thread bartjoosen

You can use R CMD BATCH if I'm correctly.
How about define a query through your routine, process the results of this
query through R, write this output in a new table, or a textfile, and load
this with your subroutine.

Bart



Felipe Carrillo wrote:
 
 
 Steve: I am already using it importing data from Access to R but was
 wondering if it can be used the other way around, creating a subroutine in
 an access module and using the RODBC functions from there.
 
 
 
 --- On Thu, 4/30/09, steve_fried...@nps.gov steve_fried...@nps.gov
 wrote:
 
 From: steve_fried...@nps.gov steve_fried...@nps.gov
 Subject: Re: [R] odbcConnectAccess function
 To: mazatlanmex...@yahoo.com
 Cc: r-h...@stat.math.ethz.ch, r-help-boun...@r-project.org
 Date: Thursday, April 30, 2009, 7:38 AM
 Feilipe,
 
 You should look at the RODBC package
 
 It works great !
 
 Steve
 
 Steve Friedman Ph. D.
 Spatial Statistical Analyst
 Everglades and Dry Tortugas National Park
 950 N Krome Ave (3rd Floor)
 Homestead, Florida 33034
 
 steve_fried...@nps.gov
 Office (305) 224 - 4282
 Fax (305) 224 - 4147
 
 


  Felipe Carrillo   

  mazatlanmex...@y  
   
  ahoo.com  
To 
  Sent by: 
 r-h...@stat.math.ethz.ch
  r-help-boun...@r- 
 cc 
  project.org   


Subject 
[R]
 odbcConnectAccess function  
  04/30/2009 07:17  

  AM MST





  Please respond to 

  mazatlanmex...@ya 

   hoo.com  





 
 
 
 
 
 HI:
 Is it possible to use the RODBC package within MS Access. I
 have been using
 from R but was just wondering if it could be used along
 with R(D)COM.
 Something like this:
 
 Dim dbs As DAO.Database
 Dim rst As DAO.Recordset
 Dim myApp As StatConnector
 Set myApp = New StatConnector
 myApp.GetErrorText
 myApp.Init R
 
 myApp.EvaluateNoReturn library(RODBC)
 myApp.EvaluateNoReturn myDB -
 odbcConnectAccess(CurrentDb)
 'query the database and save it as R object 'a'
 myApp.EvaluateNoReturn a - sqlQuery(CurrentDb,
 Paste(select * From
 Sample))
 myApp.EvaluateNoReturn plot(a)
 
 Thanks in advance
 
 
 Felipe D. Carrillo
 Supervisory Fishery Biologist
 Department of the Interior
 US Fish  Wildlife Service
 California, USA
 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained,
 reproducible code.
 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.
 
 

-- 
View this message in context: 
http://www.nabble.com/odbcConnectAccess-function-tp23317361p23365104.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] odbcConnectAccess function

2009-04-30 Thread Steve_Friedman
Feilipe,

You should look at the RODBC package

It works great !

Steve

Steve Friedman Ph. D.
Spatial Statistical Analyst
Everglades and Dry Tortugas National Park
950 N Krome Ave (3rd Floor)
Homestead, Florida 33034

steve_fried...@nps.gov
Office (305) 224 - 4282
Fax (305) 224 - 4147


   
 Felipe Carrillo   
 mazatlanmex...@y 
 ahoo.com  To 
 Sent by:  r-h...@stat.math.ethz.ch
 r-help-boun...@r-  cc 
 project.org   
   Subject 
   [R] odbcConnectAccess function  
 04/30/2009 07:17  
 AM MST
   
   
 Please respond to 
 mazatlanmex...@ya 
  hoo.com  
   
   





HI:
Is it possible to use the RODBC package within MS Access. I have been using
from R but was just wondering if it could be used along with R(D)COM.
Something like this:

Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim myApp As StatConnector
Set myApp = New StatConnector
myApp.GetErrorText
myApp.Init R

myApp.EvaluateNoReturn library(RODBC)
myApp.EvaluateNoReturn myDB - odbcConnectAccess(CurrentDb)
'query the database and save it as R object 'a'
myApp.EvaluateNoReturn a - sqlQuery(CurrentDb, Paste(select * From
Sample))
myApp.EvaluateNoReturn plot(a)

Thanks in advance


Felipe D. Carrillo
Supervisory Fishery Biologist
Department of the Interior
US Fish  Wildlife Service
California, USA

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] odbcConnectAccess function

2009-04-30 Thread Felipe Carrillo

Steve: I am already using it importing data from Access to R but was wondering 
if it can be used the other way around, creating a subroutine in an access 
module and using the RODBC functions from there.



--- On Thu, 4/30/09, steve_fried...@nps.gov steve_fried...@nps.gov wrote:

 From: steve_fried...@nps.gov steve_fried...@nps.gov
 Subject: Re: [R] odbcConnectAccess function
 To: mazatlanmex...@yahoo.com
 Cc: r-h...@stat.math.ethz.ch, r-help-boun...@r-project.org
 Date: Thursday, April 30, 2009, 7:38 AM
 Feilipe,
 
 You should look at the RODBC package
 
 It works great !
 
 Steve
 
 Steve Friedman Ph. D.
 Spatial Statistical Analyst
 Everglades and Dry Tortugas National Park
 950 N Krome Ave (3rd Floor)
 Homestead, Florida 33034
 
 steve_fried...@nps.gov
 Office (305) 224 - 4282
 Fax (305) 224 - 4147
 
 


  Felipe Carrillo   

  mazatlanmex...@y  
   
  ahoo.com  
To 
  Sent by: 
 r-h...@stat.math.ethz.ch
  r-help-boun...@r- 
 cc 
  project.org   


Subject 
[R]
 odbcConnectAccess function  
  04/30/2009 07:17  

  AM MST





  Please respond to 

  mazatlanmex...@ya 

   hoo.com  





 
 
 
 
 
 HI:
 Is it possible to use the RODBC package within MS Access. I
 have been using
 from R but was just wondering if it could be used along
 with R(D)COM.
 Something like this:
 
 Dim dbs As DAO.Database
 Dim rst As DAO.Recordset
 Dim myApp As StatConnector
 Set myApp = New StatConnector
 myApp.GetErrorText
 myApp.Init R
 
 myApp.EvaluateNoReturn library(RODBC)
 myApp.EvaluateNoReturn myDB -
 odbcConnectAccess(CurrentDb)
 'query the database and save it as R object 'a'
 myApp.EvaluateNoReturn a - sqlQuery(CurrentDb,
 Paste(select * From
 Sample))
 myApp.EvaluateNoReturn plot(a)
 
 Thanks in advance
 
 
 Felipe D. Carrillo
 Supervisory Fishery Biologist
 Department of the Interior
 US Fish  Wildlife Service
 California, USA
 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained,
 reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.