[R] lattice panel question

baptiste auguie ba208 at exeter.ac.uk
Tue Oct 14 12:43:49 CEST 2008


Hi,

I believe you want to look at ?strip.custom


someStuff <- data.frame(area = rep(c("SOUTH", "NORTH", "EAST",  
"WEST"), each
= 25),
                group = rep(c("A","B","C","D"), each = 5),
                mytime = rep(1:4),
                val1 = sample(1:100, size=100, replace=TRUE),
                val2 = sample(1:100, size=100, replace=TRUE)
        )

xyplot(val1+val2 ~ mytime | area * group, data = someStuff,
	 type = c("a","p", "g"),  
strip=strip.custom(factor.levels=letters[1:4]))


Hope this helps,

baptiste

On 14 Oct 2008, at 00:43, Ferry wrote:

> Dear R users,
>
> How to change lattice panel label/text from the automatically  
> generated
> label (based on the conditioning) to our own set of label?
>
> for example:
>
> someStuff <- data.frame(area = rep(c("SOUTH", "NORTH", "EAST",  
> "WEST"), each
> = 25),
>                group = rep(c("A","B","C","D"), each = 5),
>                mytime = rep(1:4),
>                val1 = sample(1:100, size=100, replace=TRUE),
>                val2 = sample(1:100, size=100, replace=TRUE)
>        )
>
> xyplot(val1+val2 ~ mytime | area * group, data = someStuff, type =  
> c("a",
> "p", "g"))
>
> I want to change each panel label/text from for example D/East or D/ 
> North
> ... into Deriv/From East, Deriv/From North ...
>
> I know I could change from the data, but is there a way to change it  
> from
> lattice ?
>
> thanks beforehand.
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.

_____________________________

Baptiste Auguié

School of Physics
University of Exeter
Stocker Road,
Exeter, Devon,
EX4 4QL, UK

Phone: +44 1392 264187

http://newton.ex.ac.uk/research/emag



More information about the R-help mailing list