sub.paleoTS {paleoTS}R Documentation

Subsample a paleontological time-series

Description

Subsampling is done according to the supplied logical vector or, if none is supplied, as a proportion of samples, randomly chosen.

Usage

sub.paleoTS(y, ok = NULL, k = 0.1, reset.time = TRUE)

Arguments

y

a paleoTS object

ok

a logical vector, TRUE for populations to retain

k

proportion of samples to retain, with the samples chosen randomly

reset.time

if TRUE, resets the time so that the first population time is zero

Value

the sub-sampled paleoTS object

Examples

x <- sim.GRW(ns=20)
plot(x)
xs1 <- sub.paleoTS(x, k = 0.5)
plot(xs1, add = TRUE, col="green")
keep <- rep(c(TRUE, FALSE), 10)
xs2 <- sub.paleoTS(x, ok = keep)
plot(xs2, add = TRUE, col = "red")

[Package paleoTS version 0.5.3 Index]