[R] one command on several lines

Mark Myatt mark at myatt.demon.co.uk
Thu Dec 6 12:08:38 CET 2001


Nick Kostrov <nikolai at eri.u-tokyo.ac.jp> writes:
>Hello!
>
>Is it possible to continue expand one command on several lines in R ?
>
>An attempt to write
>
>a=c(1990," ",1991,
>      1992, 
>      1993,1994,1995,1996,1997,1998,
>     1999)
>
>in a file and then 
>
>source('file')
>
>results in 
>
>Error in parse(file, n, text, prompt) : syntax error on line 55 
>

'=' is used to give a function parameter a value when calling a
function, You want '<-'.

Mark


--
Mark Myatt


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list