R/imodel_coerce.R

## FIXME: One day also coerce to dgCMatrix; not urgent

setOldClass("cModel")
setOldClass("dModel")
setOldClass("mModel")

setAs("dModel", "matrix",      function(from) {ugList(.glist(from), result="matrix"  )})
setAs("cModel", "matrix",      function(from) {ugList(.glist(from), result="matrix"  )})
setAs("mModel", "matrix",      function(from) {ugList(.glist(from), result="matrix"  )})
setAs("dModel", "igraph",      function(from) {ugList(.glist(from), result="igraph"  )})
setAs("cModel", "igraph",      function(from) {ugList(.glist(from), result="igraph"  )})
setAs("mModel", "igraph",      function(from) {ugList(.glist(from), result="igraph"  )})

Try the gRim package in your browser

Any scripts or data that you put into this service are public.

gRim documentation built on Sept. 11, 2024, 7:02 p.m.