# Centralization measures in weighted graphs

I'm using the igraph package in R to analyze network data. I'm currently trying to calculate some centrality measures for the vertices of my graph and the corresponding centralization scores. My network is both directed and weighted.

require(igraph)
set.seed(12152)

m <- expand.grid(from = 1:4, to = 1:4)
m <- m[m$from != m$to, ]