Skip to content
Advertisement

Is there a better way to code this sqlQuery in R?

I’m writing an R script to get some database data and then do stuff with it, using the RODBC package. Currently all my sqlQuery commands are one long string;

which looks ugly and is hard to read/update. I’ve tried putting them multiline, but then new line characters get in the way, currently my best is this using lots of paste’s;

But I don’t like having to put quotes around everyline, and getting my whitespace correct. Is there a better way ?

Advertisement

Answer

I would use something like this:

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement