knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-",
  fig.retina =2 
)

gghazard : Improved Base and Grid Plots for Survival Hazard Cox Regression

The following functions are implemented:

News

Installation

devtools::install_github("hrbrmstr/gghazard")
options(width=120)

Usage

library(survival)
library(ggplot2)
library(gghazard)

# current verison
packageVersion("gghazard")

vfit <- coxph(Surv(time, status) ~ trt + factor(celltype) +
              karno + age, data=veteran, x=TRUE)
gg_cox_zph(fortify(cox.zph(vfit)), pred_col="maroon")
par(mfrow=c(2, 3))
plot(cox.zph(vfit), smoothcol="maroon", confcol="maroon")
par(mfrow=c(1, 1))

Test Results

library(gghazard)
library(testthat)

date()

test_dir("tests/")

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.



hrbrmstr/gghazard documentation built on May 17, 2019, 5:08 p.m.