wk12
wk12.R assas 2023-03-28 # Load required libraries library (GGally) ## Warning: package 'GGally' was built under R version 4.2.3 ## Loading required package: ggplot2 ## Warning: package 'ggplot2' was built under R version 4.2.3 ## Registered S3 method overwritten by 'GGally': ## method from ## +.gg ggplot2 library (network) library (sna) library (ggplot2) # Create a random graph with 10 nodes net <- rgraph ( 10 , mode = "graph" , tprob = 0.5 ) # Convert the graph to a network object net <- network (net, directed = FALSE ) # Create custom labels for the vertices vertex_labels <- c ( "A" , "B" , "C" , "D" , "E" , "F" , "G" , "H" , "I" , "J" ) # Customize the network visualization ggnet2_customized <- ggnet2 (net, node...