David Barron schrieb:
>
> If the value of EXPR is an integer between 1 and nargs()-1 then the
> corresponding element of ... is evaluated and the result returned.
>
Thank you, I wondered about the
> integer between 1 and nargs()-1
and the example from the help file for(i in c(-1:3,9))  print(switch(i,
1,2,3,4))
No see I  that the 1,2,3,4 is the output not the value, but it's not
very clear for me ho it works.
I will try to find it out ...
The switch for Integer is very different from C++ or Pascal .. maybe
this was the reason for the problem.

Regards Knut

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

Reply via email to