as.matrix.cascade: Convert a cascade object to a matrix

View source: R/cascade.R

as.matrix.cascadeR Documentation

Convert a cascade object to a matrix

Description

Generates a matrix containing the cascade information in the cascade object in wide format. Missing values are used for nodes that do not experience an event in a cascade.

Usage

## S3 method for class 'cascade'
as.matrix(x, ...)

Arguments

x

cascade object to convert.

...

additional arguments to be passed to or from methods. (Currently not supported.)

Value

A matrix containing all cascade information in wide format. That is, each row of the matrix corresponds to a node and each column to a cascade. Cell entries are event times. Censored nodes have NA for their entry.

Examples


data(cascades) 
as.matrix(cascades)


NetworkInference documentation built on Nov. 28, 2025, 9:06 a.m.