sub.paleoTS {paleoTS} | R Documentation |
This function subsets a paleoTS
object, returning a shorter series of specified or random samples from the original.
sub.paleoTS(y, ok = NULL, k = 0.1)
y |
a paleoTS object |
ok |
vector indicating which samples to retain; can be logical or numeric |
k |
proportion of samples to retain, chosen randomly |
If ok = NULL
, the subsetting is done by retaining a proportion k
of the initial samples, chosen at random. If ok
is specified, those samples indicated will be retained.
the subetted paleoTS
object
Gene Hunt
Hunt, G. 2006. Fitting and comparing models of phyletic evolution: random walks and beyond. Paleobiology 32:578–601.
y <- sim.GRW(ns=100, ms=0, vs=0.3) plot(y) ys1<- sub.paleoTS(y, ok=y$mm > mean(y$mm)) # subsetting with logical ok ys2<- sub.paleoTS(y, ok=1:10) # subsetting with numeric ok ys3<- sub.paleoTS(y, k=0.1) # subsetting random 10% plot(ys1, add=TRUE, col="red") plot(ys2, add=TRUE, col="blue") plot(ys3, add=TRUE, col="grey", cex=2, pt.ch=1)