Re: [R] Mathematical annotation in lattice strip: Is it possible?

From: Deepayan Sarkar <>
Date: Mon, 12 May 2008 09:05:23 -0700

On 5/12/08, Andrewjohnclose <> wrote:
> I have tried without success to find a way including the square root symbol
> in lattice strips as part of my conditioning labels. I have tried
> supplementing by creating a list of vectors using the function
> coupled with the expression function used in xlab/ylab.
> xyplot(adjusted_Rand_index~cluster|distance_measure, main="Level of
> agreement between partitions: Wards Method", ylab="Coefficient value
> (adjusted rand index)", xlab="number of clusters", type="l", data=randA1,
> strip=strip.custom(varnames=c(expression(sqrt(Bray-Curtis)))

You say 'var.names', but use 'varnames'. ?strip.custom also says: vector of character strings or expressions as long as the

          number of conditioning variables.  The contents are
          interpreted as names for the conditioning variables.  Whether
          they are shown on the strip depends on the values of
          'strip.names' and 'style' (see below).  By default, the names
          are shown for shingles, but not for factors.

This seems to work as expected:

xyplot(1 ~ 1 | gl(1, 1),

       strip = strip.custom( = expression(sqrt(Bray-Curtis)),
                            strip.names = TRUE, strip.levels = FALSE))

-Deepayan mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Mon 12 May 2008 - 17:29:31 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 12 May 2008 - 17:30:40 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive