Re: [R] Lattice strip labels for two factors

2006-09-26 Thread Deepayan Sarkar
On 9/26/06, Joe Moore [EMAIL PROTECTED] wrote: Dear All: In the following code which I modified from previous question, Perhaps you should also have checked if it runs after the modification. in addition to show the fact1 level names (y, b, r) in strips, I also want to have a color bar to

Re: [R] Lattice strip labels for two factors

2006-09-25 Thread Rafael Duarte
Dear Gabor and Deepayan, Many thanks for your help. I used suggestion 3 from Gabor (it worked well with my long df ) and will try Deepayan's suggestion. Rafael Deepayan Sarkar wrote: On 9/23/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: 1. You can write a custom strip function:

Re: [R] Lattice strip labels for two factors

2006-09-23 Thread Rafael Duarte
Thank you for your suggestion. This could be a solution that I didn't think of. But I forgot to say that I didn't want to change the original data frame (I have other code that depends on the original df and on the original factor levels). I was looking more for an implementation directly in

Re: [R] Lattice strip labels for two factors

2006-09-23 Thread Gabor Grothendieck
1. You can write a custom strip function: my.strip - function(which.given, ..., factor.levels) { levs - if (which.given == 1) factor.levels else c(faro, porto, lisbon, setubal) strip.default(which.given, ..., factor.levels = levs) }

Re: [R] Lattice strip labels for two factors

2006-09-23 Thread Deepayan Sarkar
On 9/23/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: 1. You can write a custom strip function: my.strip - function(which.given, ..., factor.levels) { levs - if (which.given == 1) factor.levels else c(faro, porto, lisbon, setubal)

Re: [R] Lattice strip labels for two factors

2006-09-22 Thread Gabor Grothendieck
Try this: levels(df$fact2) - c(faro,porto,lisbon,setubal) xyplot( value ~ year | fact1*fact2, data=df, type=b) On 9/22/06, Rafael Duarte [EMAIL PROTECTED] wrote: Dear list, My problem is to change the strip text of lattice panels when using two factors. I have a data frame with two factors: