View an ERGM Table in the RStudio Viewer or System Browser
Source:R/tabulergm_table.R
tabulergm_view.RdBuilds 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().
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 bytabulergm_table().tabulergm_view(tabulergm_kable): Method for formatted tables returned bytabulergm_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)