Message-ID: <Pine.WNT.4.44.0211060835150.852-100000@GYG-63G37>
Date: 2002-11-06T07:39:16Z
From: Lorenz Gygax
Subject: R bug? (if-else problem in main program)
In-Reply-To: <courier.3DC89420.00006EC9@latte.harvard.edu>
> Example:
> -------
> a <- 1
>
> if ( a == 1 )
> print("yes")
> else
> print("no")
> --------
If you want to split this over several lines, you need curly braces:
a <- 1
if ( a == 1 ) {
print ('yes')
} else {
print ('no')
}
Cheers, Lorenz
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._