Watts-College / crj-507-spring-2024

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

Review session 2 question #10

Closed jacobtnyoung closed 7 months ago

jacobtnyoung commented 7 months ago

I can't get the colors to change for the graph object a.

library( sna )

a <- rgraph( 5 )

gplot( a )
jacobtnyoung commented 7 months ago

Good question @jacobtnyoung! You need to add the argument vertex.col= to change the colors. Like this:


library( sna )

a <- rgraph( 5 )

gplot( a )

# here is how you add that argument

gplot( a ,
vertex.col = "blue"
 )