Learn R Programming

paleoTS (version 0.6.2)

as.paleoTS: Make a Paleontological Time-series object

Description

Combines information into an object of class paleoTS

Usage

as.paleoTS(
  mm,
  vv,
  nn,
  tt,
  MM = NULL,
  genpars = NULL,
  label = NULL,
  start.age = NULL,
  oldest = c("first", "last"),
  reset.time = TRUE
)

Value

a paleoTS object

Arguments

mm

vector of sample means

vv

vector of sample variances

nn

vector of sample sizes

tt

vector of sample ages

MM

vector of true means (simulated data)

genpars

generating parameters (simulated data)

label

optional, label for time-series

start.age

optional, age of oldest sample

oldest

value indicating if the oldest sample is first or last in the sequence

reset.time

logical; if TRUE, then change time scale to start at t=0 and adjust start.age accordingly

Details

This function combines data into a paleoTS object. For empirical data it may be more convenient to use read.paleoTS.

If sample ages decrease through the sequence, as if given in millions of years ago, tt will automatically be converted to time elapsed from the beginning of the sequence as long as reset.time = TRUE.

See Also

read.paleoTS

Examples

Run this code
x <- as.paleoTS(mm = rnorm(20), vv = rep(1, 20), nn = rep(25, 20), tt=0:19)
plot(x) # easier to use sim.Stasis()

Run the code above in your browser using DataLab