Learn R Programming

NetworkInference (version 1.2.5)

as.matrix.cascade: 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 cascade
as.matrix(x, ...)

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.

Arguments

x

cascade object to convert.

...

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

Examples

Run this code

data(cascades) 
as.matrix(cascades)

Run the code above in your browser using DataLab