Learn R Programming

rcarbon (version 1.5.1)

as.CalGrid: Convert data to class CalGrid.

Description

Tries to coerce any two-column matrix or data.frame to a calibrated probability distribution (an object of class "CalGrid") for use by the rcarbon package.

Usage

as.CalGrid(x)

Value

A CalGrid class object of probabilities or summed probabilities per calendar year BP.

Arguments

x

A two-column matrix or data.frame class object.

Examples

Run this code
df <- data.frame(calBP=5000:2000,PrDens=runif(length(5000:2000)))
mycalgrid <- as.CalGrid(df)
plot(mycalgrid)

Run the code above in your browser using DataLab