Skip to contents

The function will slices time with a given set of boundaries and produce a time scale object if desired.

Usage

slice(x, breaks, offset = 0, ts = TRUE, revtime = TRUE)

Arguments

x

(numeric) Vector of continouos age/time estimates.

breaks

(numeric) Vector of boundaries, the breaks argument of the cut function

offset

(numeric) Single value. If desired the resulting integer bin numbers can be offset by some amount.

ts

(logical) Should a time scale object be also produced when the function is run?

revtime

(logical) Should the time dimension be reversed? This argument is set to TRUE by default, meaning that the function will reverse the order of time: smaller values of x will be translated to higher values (slc) in the function output.

Value

Either of new entries and levels or time scale.

Details

Due to stratigraphic constraints, we can only process deep time data, when it is sliced to discrete bins. It is suggested that you do this separately for most of your analyses. This function is also used by the codedivDyn function when age entries are provided.

Examples

y<- runif(200, 0,100)
au <- slice(y, breaks=seq(0, 100, 10))
withOut <- slice(y, breaks=seq(0, 100, 10), ts=FALSE)