[R] dbSendQuery with R variables
kMan
kchamberln at gmail.com
Wed May 12 04:15:51 CEST 2010
?paste
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?
Sincerely,
KeithC.
-----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
Rhelpers:
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.:
stations=c("stationA","stationB")
How would I modify the above statement to query from stations[[1]] (aka
"stationA")?
--j
More information about the R-help
mailing list