Created
April 5, 2018 09:59
-
-
Save bhachauk/62314e2ce050d4fb7a289587be9b452f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
output$metrics <- renderTable ({ | |
inFile <- input$file1 | |
if (is.null(inFile)) | |
return(NULL) | |
df <- read.csv(inFile$datapath, header =TRUE)[ ,c(input$aend,input$zend,input$linklab)] | |
net <- graph_from_data_frame(d=df, vertices=NULL, directed=T) | |
data.frame( | |
deg=degree(net), | |
bet=betweenness(net), | |
clo=closeness(net), | |
eig=evcent(net)$vector, | |
tra=transitivity(net,type=c("local")) | |
) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment