I apologize for the probably very obvious error - I am quite new to R. I am running bridge centrality and receive this error, and haven't had luck searching online. Any advice would be much appreciated.
prcdcu <- read_sav("prcdcu.sav")[c(1:6, 7:18)]
dim(prcdcu)
head(prcdcu)
prcdcu_cor <- estimateNetwork(prcdcu, default = c("cor"))
prcdcu_cor
community_structure <- c(rep("cd", 6), rep("cu", 12))
community_structure
plot(prcdcu_cor, groups = community_structure, layout = "spring", color = c("white", "dark grey"), vsize = 5)
bridge_centrality <- bridge(prcdcu_cor, communities = community_structure)
Error in if (dim(input)[1] == dim(input)[2]) { :
argument is of length zero