Skip to content
Prev 106083 / 398506 Next

Passing arguments to panels in trellis plots

On 12/13/06, Marco Chiarandini <marco at imada.sdu.dk> wrote:
Since you haven't bothered to follow the posting guide at all, it took
me a while to figure out that you live in that alternate R universe
created by Prof Harrell. Can't help you there, but in the standard
universe, things seem fairly simple:


library(survival)

fm <- survfit(Surv(time, status) ~ x, data=aml)

xyplot(surv ~ time, data = fm, type = "s",
       groups = rep(names(strata), strata))

xyplot(surv ~ time, data = fm, type = "s",
       groups = rep(names(strata), strata),
       scales = list(log = TRUE))

xyplot(surv + lower + upper ~ time | rep(names(strata), strata),
       data = fm, type = "s",
       scales = list(y = list(log = TRUE)))

-Deepayan