[R] Plot depends on conditions

jim holtman jholtman at gmail.com
Mon Jul 7 18:56:12 CEST 2008


It sounds like an IF-THEN-ELSE should do the job.  What happens in the
c1 & c4 are FALSE, or some other combination?  Is your description the
priority order that the tests are to be done in?

On Mon, Jul 7, 2008 at 10:45 AM, mysimbaa <adel.tekari at sisltd.ch> wrote:
>
> Dear R users,
>
> I want to do some plots which depends on conditions (7 conditions)
> I had collected all the conditions in a vector Cond(c1,c2,c3,c4,c5,c6,c7)
> All the conditions are logic (TRUE/FALSE).
>
> If c1 or c2 are FALSE I want to have only one Plot. Then I want to have a
> break (something like stop() or abort()) -> no need to continue the
> execution.
> If c3 or c4 are FALSE I want par(mfrow=c(2,1)). Then a break
> If c5,c6 or c7 are FALSE par(mfrow=c(2,2)). Then a break
>
> If (all(Cond)) then another plot, par(mfrow=c(2,2))
>
> I think the best way is to build a function which plots depending on the
> conditions
> Do any one have an idea how to do this properly?
>
> Thanks in advance,
> Adel
>
> --
> View this message in context: http://www.nabble.com/Plot-depends-on-conditions-tp18318449p18318449.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at 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.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem you are trying to solve?



More information about the R-help mailing list