« Return to Thread: Variable names in lattice XY-plot

Re: Variable names in lattice XY-plot

by ukoenig :: Rate this Message:

Reply to Author | View in Thread

Thanks a lot
Baptiste and Deepayan!

That was very helpful-things can be so easy...

-Udo


Quoting Deepayan Sarkar <deepayan.sarkar@...>:

> On Fri, Jul 3, 2009 at 1:02 PM, baptiste
> auguie<baptiste.auguie@...> wrote:
>> ?strip.custom
>>
>>
>> p <-
>> xyplot(acet+chol+ino+acetp ~ zp,
>>      group=grp,
>>      data=data,
>>      type="l",
>>      scales=list(relation="free"),
>>      auto.key=list(title="
>>>
>>> Neurotransmitters", border=TRUE))
>>
>>
>>
>> update(p, strip=strip.custom(factor.levels=letters[1:4]))
>
> Or,
>
>> dimnames(p)
> [[1]]
> [1] "acet"  "chol"  "ino"   "acetp"
>> dimnames(p)[[1]]
> [1] "acet"  "chol"  "ino"   "acetp"
>> dimnames(p)[[1]] <- c("Acetylaspartate Thalamus", "Choline  
>> Thalamus", "Acetylaspartate parieoc", "Inositole Thalamus")
>> p
>
> which is more easily generalizable when more than one conditioning
> variable is involved.
>
> -Deepayan
>

______________________________________________
R-help@... 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.

 « Return to Thread: Variable names in lattice XY-plot