extract_times: Extract time points from a probability matrix or vector

View source: R/helpers.R

extract_timesR Documentation

Extract time points from a probability matrix or vector

Description

Helper function to consistently obtain and validate the time points associated with a probability matrix or vector.

Usage

extract_times(x, times = NULL)

Arguments

x

(numeric() | matrix())
Probability vector (length = time points) or matrix (rows = observations, columns = time points).

times

(numeric() | NULL)
Optional vector of time points corresponding to x.

Value

A validated numeric vector of time points.


survdistr documentation built on April 9, 2026, 5:09 p.m.