how to type long string
----- Original Message ----- From: "Guoqiang Wang" <guo52717 at yahoo.com> To: <r-help at lists.R-project.org> Sent: Saturday, July 14, 2001 12:08 PM Subject: [R] how to type long string
Hi, All: I try to type some long string in R console, whenever I like to change to a new line, I get error message. The following is my simple code -------------------------------------- h3 <- sqlQuery(myConnect, "select * from console where Error: syntax error byday = 'dd1'group by by hour") Error: syntax error --------------------------------------- Any Hints? Thanks. Grant, UWO
Normally, one can use "+" as a continuation character. Because you are in the midst of typing a string the continuation character won't work in this instance. You could perhaps use "paste" to join together the pieces of the query. For example-
h3 <- sqlQuery(myConnect, paste("select * from console where", +
+ "foo > 20 order by foobar")) -Bill -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._