How can I pass R variable into sqldf? -


i have query this:

sqldf("select tenscore data state_p = 'andhrapradesh'") 

but have "andhrapradesh" in variable statevalue. how can use variable in select query in r same result above.

please show me syntax.

you can use sprintf:

sqldf(sprintf("select tenscore data state_p = '%s'", statevalue)) 

Comments

Popular posts from this blog

javascript - WinJS appendTextAsync producing scheduler errors -

minify - Minimizing css files -

Sockets with kotlin -