Skip to contents

Builds a self-contained HTML page containing the formatted ERGM table (with MathJax for LaTeX math rendering) and opens it in the RStudio viewer pane when available, falling back to utils::browseURL().

Usage

tabulergm_view(object, ...)

# S3 method for class 'ergm'
tabulergm_view(object, ...)

# S3 method for class 'formula'
tabulergm_view(object, ...)

# S3 method for class 'tabulergm_table'
tabulergm_view(object, ...)

# S3 method for class 'tabulergm_kable'
tabulergm_view(object, ...)

Arguments

object

A fitted ergm object, an ERGM formula, or a table returned by tabulergm_table().

...

Additional arguments passed to tabulergm_table().

Value

Invisibly returns the path to the temporary HTML file.

Methods (by class)

  • tabulergm_view(ergm): Method for fitted ergm objects.

  • tabulergm_view(formula): Method for formula objects.

  • tabulergm_view(tabulergm_table): Method for table data frames returned by tabulergm_table().

  • tabulergm_view(tabulergm_kable): Method for formatted tables returned by tabulergm_table().

Examples

library(ergm)
fit <- readRDS(system.file("fits", "fit_edges.rds", package = "tabulergm"))
tabulergm_view(fit)

# Also works with a formula (shows term metadata only)
tabulergm_view(network ~ edges + triangle)