[R] one command on several lines

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Wed Dec 5 15:32:59 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 

Shouldn't be a problem if you just make sure that the preceding line
is incomplete, but if that "=" was meant as an assignment, then you'll
get the parse error even on one line.


-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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