On Sun, Aug 12, 2012 at 8:07 PM, Sachinthaka Abeywardana
<sachin.abeyward...@gmail.com> wrote:
> The thing is I have about 10 cases. I saw the ifelse statement

Note that there is no "ifelse" statement: there is only nested if/else of forms

if

else if

         else if

                   else ....


> but was
> wondering if there was a cleaner method of doing it. The coding will get
> really messy when I write all 10 cases.
>
> Cheers,
> Sachin
>

Possibly look at ?switch

Michael

______________________________________________
R-help@r-project.org 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