[R] Lattice: Changing the names of conditional variables in strips to mathematical expressions

Andrewjohnclose a.j.close at ncl.ac.uk
Sat Aug 2 11:48:40 CEST 2008


Hi,

I know this has come up before, but I am having a hard time getting any of
the solutions I have found to work!

I am trying to change the conditioning variable names in my xyplot from the
default names as they appear from the data table - see following:
 
X=densityplot(~density|type,data=Query,plot.points="jitter",ref=TRUE,width="sj",
panel=function(x, ...){
panel.grid(h=-1, v=-1)
panel.densityplot(x, ...)
})

X

to 

dimnames(X)[[1]] <- expression((sqrt(Gower^{1})),(sqrt(Kulczynski))

X

The key issue is gaining the square root symbols and superscript position of
the "1" ...

As an aside, it is possible to vary the font type within expression? Say
setting the text  to italics but leaving the superscript "1" as ariel?

Suggestion would be greatly appreciated

Thank you

Andrew

http://www.nabble.com/file/p18787745/Query.csv Query.csv 
-- 
View this message in context: http://www.nabble.com/Lattice%3A-Changing-the-names-of-conditional-variables-in-strips-to-mathematical-expressions-tp18787745p18787745.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list