# Create a time bins object:
time_bins <- matrix(
data = c(99.6, 93.5, 93.5, 89.3, 89.3, 85.8, 85.8, 83.5, 83.5, 70.6, 70.6, 65.5),
ncol = 2,
byrow = TRUE,
dimnames = list(
c("Cenomanian", "Turonian", "Coniacian", "Santonian", "Campanian", "Maastrichtian"),
c("fad", "lad")
)
)
# Check that this is a valid timeBins object (will fail as class is not set):
is.timeBins(x = time_bins)
# Set class as timeBins:
class(time_bins) <- "timeBins"
# Check that this is a valid timeBins object (will succeed as format and
# class are correct):
is.timeBins(x = time_bins)
Run the code above in your browser using DataLab