On 17/04/07 - 14:59, Roland Rau wrote: > On 4/17/07, Luca Braglia <[EMAIL PROTECTED]> wrote:
> >ifelse(T,1+1,1+2) > [1] 2 > >ifelse(F,1+1,1+2) > [1] 3 > >ifelse(T,"hello","goodbye") > [1] "hello" > >ifelse(F,"hello","goodbye") > [1] "goodbye" > >ifelse(T,print("hello"),print("goodbye")) > [1] "hello" > [1] "hello" > >ifelse(F,print("hello"),print("goodbye")) > [1] "goodbye" > [1] "goodbye" > >ifelse(T,print(1+1),print(1+2)) > [1] 2 > [1] 2 > >ifelse(F,print(1+1),print(1+2)) > [1] 3 > [1] 3 Thank you , Weiwei and Roland, all right now: I was thinking wrong! bye Luca ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.