On Mon, Aug 4, 2008 at 1:39 PM, John Smith <[EMAIL PROTECTED]> wrote: > I have another questions. How can I type specific names into strips of the > resulting plot? > > For instance, in the resulting figure from the attached code, instead of > 'umbrella(d)', I want have 'UMBRELLA' in the strip. > > library(lattice) > > flat <- function(d) 0 * d > linear <- function(d) -(1.65/8) * d > logistic <- function(d) 0.015 - 1.73 / (1 + exp(1.2 * (4-d))) > umbrella <- function(d) -(1.65/3) * d + (1.65 / 36) * d^2 > emax <- function(d) -1.81 * d / (0.79 + d) > sigmoid <- function(d) -1.70 * d^5 / (4^5 + d^5) > > xyplot(flat(d) + linear(d) + logistic(d) + umbrella(d) + emax(d) + > sigmoid(d) ~ d, > data = list(d = seq(0, 8, length = 101)), > ylab='Expected change from baseline in VAS at Week 6', xlab='Dose', > type = "l", outer = TRUE, )
Here's one solution. xyplot(flat(d) + linear(d) + logistic(d) + umbrella(d) + emax(d) + sigmoid(d) ~ d, data = list(d = seq(0, 8, length = 101)), ylab='Expected change from baseline in VAS at Week 6', xlab='Dose', type = "l", outer = TRUE, strip = strip.custom(factor.levels = c("FLAT", "LINEAR", "LOGISTIC", "UMBRELLA", "EMAX", "SIGMOID"))) -Deepayan ______________________________________________ R-help@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.