[R] dbSendQuery with R variables
ggrothendieck at gmail.com
Wed May 12 13:29:32 CEST 2010
Try this. If fn$ prefaces the function name, subject to certain rules
string which determine which arguments are re-interpreted,
interpolation somewhat like in perl occurs. Here we have enclosed
stations[] in back quotes.
stations <- c("stationA", "stationB")
rs_stations <- fn$dbSendQuery(con_stations, "select * from `stations[]`")
On Mon, May 10, 2010 at 6:21 PM, Jonathan Greenberg
<greenberg at ucdavis.edu> wrote:
> 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[]
> (aka "stationA")?
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help