surv3d: Spatial Survival Plot in 3D

Description Usage Arguments Details Value Author(s) Examples

Description

Do a 3d plot of spatial survival data

Usage

1
2
3
4
surv3d(spp, ss, lwd = 2, lcol = "black", lalpha = 1, pstyle = c("point",
  "text"), psize = c(20, 10), pcol = c("red", "black"), ptext = c("X",
  ""), palpha = 1, title = "Spatial Survival", basegrid = TRUE,
  baseplane = TRUE)

Arguments

spp

A spatial points data frame

ss

A Surv object (with right-censoring)

lwd

Line width for stems

lcol

Line colour for stems

lalpha

Opacity for stems

pstyle

Point style "point" or "text"

psize

Vector of length 2 for uncensored/censored points size

pcol

Vector of length 2 for uncensored/censored points colours

ptext

Vector of length 2 for uncensored/censored text characters

palpha

Opacity for points/text

title

Main title for plot

basegrid

add a grid at t=0

baseplane

add a plane at t=0

Details

Uses rgl graphics to make a spinny zoomy plot

Value

nothing

Author(s)

Barry S Rowlingson

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
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)
clear3d();surv3d(d,d$surv,baseplane=TRUE,basegrid=TRUE)
clear3d();surv3d(d,d$surv,baseplane=TRUE,basegrid=TRUE,pstyle="t",lalpha=0.5,lwd=3,palpha=1)

## End(Not run)

bentaylor1/spatsurv documentation built on May 12, 2019, 3:02 p.m.