| as_netobject | R Documentation |
Promotes a psychnet result (class c("psychnet",
"cograph_network")) or any bare cograph_network to the dual-class
c("netobject", "cograph_network") used throughout Nestimate, so it
dispatches to the package's verbs (centrality(), plot(),
bootstrap, reliability, ...). A netobject is returned unchanged.
as_netobject(x)
## S3 method for class 'netobject'
as_netobject(x)
## S3 method for class 'psychnet'
as_netobject(x)
## S3 method for class 'cograph_network'
as_netobject(x)
## Default S3 method:
as_netobject(x)
x |
A |
The psychnet method re-derives the integer-indexed edge table that Nestimate
expects (psychnet stores character-labelled edges), preserves the estimator
name in $method, and parks every psychnet-specific field - including
the graphical-lasso $kkt optimality certificate - under
$meta$psychnet so nothing is lost in translation.
A c("netobject", "cograph_network") object.
validate_netobject
net <- build_cor(data.frame(a = rnorm(50), b = rnorm(50), c = rnorm(50)))
identical(as_netobject(net), net) # netobjects pass through unchanged
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.