Re: [R] Plot depends on conditions

From: jim holtman <jholtman_at_gmail.com>
Date: Mon, 07 Jul 2008 12:56:12 -0400

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?

______________________________________________
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.
Received on Mon 07 Jul 2008 - 16:58:57 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 10 Jul 2008 - 13:31:52 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive