lundi 20 avril 2015

How do I keep all escape characters in a SQL string for querying a POSTGRES DB using R?

I am using R to query data from a Postgres database. The query I created in pgAdmin3 has lots of escape characters in it, and I'd to pull in the entire SQL string without having to deal with escape characters again, something like Python's triple quotes """.

SELECT brand
,regexp_replace(upper(hybridtype), '\(.*\)|\/|-|TM|\s','','g') as hybrid
FROM seeds

How can I get that SQL text into R retaining all the characters?

Aucun commentaire:

Enregistrer un commentaire