as.matrix.cascade {NetworkInference}R 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)


[Package NetworkInference version 1.2.4 Index]