[R] dbSendQuery with R variables

kMan kchamberln at gmail.com
Wed May 12 04:15:51 CEST 2010


See also,
http://rwiki.sciviews.org/doku.php?id=large_scale_data:lsdioi_sqchunk for
additional examples.

Assuming stations[1:2] are tables your database:
simpleQuery<- paste("SELECT * FROM", stations[1]) # should read the whole
table when invoked
dbGetQuery(con_stations, simpleQuery)

Is this sort of what you had in mind?


-----Original Message-----
From: Jonathan Greenberg [mailto:greenberg at ucdavis.edu] 
Sent: Monday, May 10, 2010 4:21 PM
To: r-help
Subject: [R] dbSendQuery with R variables


I'd like to modify this RSQLite statement:

rs_stations<-dbSendQuery(con_stations, "select * from stations")

so that stations is actually an R variable, e.g.:


How would I modify the above statement to query from stations[[1]] (aka


More information about the R-help mailing list