Re: [R] bwplot: how to get plotmath labels?

From: Marius Hofert <m_hofert_at_web.de>
Date: Sat, 26 Mar 2011 18:38:25 +0100

Dear David,

many thanks, that was it.

Cheers,

Marius

On 2011-03-26, at 18:04 , David Winsemius wrote:

>
> On Mar 26, 2011, at 4:47 AM, Marius Hofert wrote:
>

>> Dear expeRts,
>> 
>> How can I get plotmath-labels in the bwplot below?
>> As you can see, I couldn't manage to pass the expressions through the dimnames
>> argument.

>
> It would have been helpful, and may still be necessary, for you to explain more fully what you were attempting to do. See if this effort was informative.
>
>> Marius
>> 
>> library(lattice)
>> 
>> ## data
>> dim <- c(100, 6, 2, 3)

>
> # did not find the dimnames object useful
> # at least to the extent I understood the question
>
>> data <- rexp(prod(dim))
>> arr <- array(data=data, dim=dim, dimnames=dimnames)
>> z <- abs(sweep(arr, 3, 1))
>> df <- as.data.frame.table(z, responseName="error")
>> 
>> ## box plot
>> bwplot(error ~ methods | attr * groups, data=df,
>>      as.table=TRUE, outer=FALSE, strip=TRUE, notch=TRUE,
>>      scales=list(alternating=c(1,1), tck=c(1,0)))

>
> bwplot(error ~ methods | attr * groups, data=df,
> as.table=TRUE, outer=FALSE, strip=TRUE, notch=TRUE,
> scales=list(y=list(alternating=TRUE,
> tck=c(1,0)),
> x=list(labels=c( expression(method == 1), expression(alpha == 1)) )
> ) )
>
>
>
> David Winsemius, MD
> West Hartford, CT
>


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. Received on Sat 26 Mar 2011 - 17:41:01 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 Sat 26 Mar 2011 - 17:50:25 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive