survmap: Map survival data

Description Usage Arguments Details Value Author(s) Examples

Description

Map survival data

Usage

1
  survmap(spp, ss)

Arguments

spp

a spatial points data frame

ss

a Surv object

Details

Produce a map of survival times showing censoring

Value

a ggplot object

Author(s)

Barry S Rowlingson

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
require(sp)
require(survival)
d = data.frame(
  x=runif(40)*1.5,
  y = runif(40),
  age=as.integer(20+30*runif(40)),
  sex = sample(c("M","F"),40,TRUE)
)
coordinates(d)=~x+y
d$surv = Surv(as.integer(5+20*runif(40)),runif(40)>.9)
survmap(d, d$surv)

barryrowlingson/spatsurvvis documentation built on May 11, 2019, 8:30 p.m.