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

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

minify - Minimizing css files -

php - How to remove letter in front of the word laravel -