Watts-College / crj-507-spring-2024

https://watts-college.github.io/crj-507-spring-2024/
MIT License
1 stars 0 forks source link

Confused about using as.network() function #8

Closed jacobtnyoung closed 7 months ago

jacobtnyoung commented 7 months ago

I wasn't sure on Step 4 how to make an object of class network.

jacobtnyoung commented 7 months ago

Ok. You need to use the as.network() function to coerce the matrix to an object of class network. Like this:


library( network )

mat <- matrix( c( 0,1,0,1,0,0,1,1,0 ), nrow = 3, byrow = TRUE) 

net <- as.network( mat, directed = FALSE )
jacobtnyoung commented 7 months ago

This is just an example of how to post an issue