rsqlite

RSQLite query with user specified variable in the WHERE field [duplicate]

﹥>﹥吖頭↗ 提交于 2019-11-27 03:32:58
问题 This question already has answers here : Dynamic “string” in R (3 answers) Closed 2 years ago . I am using a the RSQLite library in R in to manage a data set that is too large for RAM. For each regression I query the database to retrieve a fiscal year at a time. Now I have the fiscal year hard-coded: data.annual <- dbGetQuery(db, "SELECT * FROM annual WHERE fyear==2008") I would like to make the fiscal year (2008 above) to make changes a bit easier (and fool-proof). Is there a way that I can