[R] Plot depends on conditions

mysimbaa adel.tekari at sisltd.ch
Mon Jul 7 16:45:16 CEST 2008


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.



More information about the R-help mailing list