Re: [R] how to type long string

About this list Date view Thread view Subject view Author view Attachment view

From: Bill Oliver (wloliver@qwest.net)
Date: Sun 15 Jul 2001 - 06:41:36 EST


Message-id: <004d01c10ca5$60551390$be57e43f@91qez>


----- Original Message -----
From: "Guoqiang Wang" <guo52717@yahoo.com>
To: <r-help@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@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Wed 10 Mar 2004 - 08:18:19 EST