TABLE OF CONTENTS


methodsBiv/plot.bivrec [ Functions ]

NAME

    plot.bivrec --- S3 plot method for bivrec objects

FUNCTION

User-facing plotting function to plot survivor functions

SYNOPSIS

432 plot.bivrec <- function(x, which = c(0, 1, 2), main = NULL, xscale = 1, hazscale = 1,
433                         add = FALSE, legend = NULL, ...)

INPUTS

    see package documentation

SOURCE

436 {
437     if(length(which) > 1) which <- 0
438     which <- c(0, 1, 2)[pmatch(which, c(0, 1, 2))]
439     processnames <- attr(x, "processnames")
440     if(!is.null(main)) processnames <- c(main[1], ifelse(length(main) > 1,
441                      main[2], main[1]))
442     if(which == 0) par(mfrow = c(1, 2))
443     if(which == 0 | which == 1) plotsurvivor(x$hazard$breaks1 * xscale,
444         x$hazard$hazard1 / xscale * hazscale, main = processnames[1],
445         add = add, legend = legend, ...)
446     if(which == 0 | which == 2) plotsurvivor(x$hazard$breaks2 * xscale,
447         x$hazard$hazard2 / xscale * hazscale, main = processnames[2],
448         add = add, legend = legend, ...)
449     invisible(x)
450 }