[R] Variable names in lattice XY-plot

ukoenig at med.uni-marburg.de ukoenig at med.uni-marburg.de
Fri Jul 3 23:12:38 CEST 2009


Thanks a lot
Baptiste and Deepayan!

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

-Udo


Quoting Deepayan Sarkar <deepayan.sarkar at gmail.com>:

> On Fri, Jul 3, 2009 at 1:02 PM, baptiste
> auguie<baptiste.auguie at googlemail.com> 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
>




More information about the R-help mailing list