0

Currently, I touched something about SNA and encountered the problem of how to use R to analyze the kcore network from file.

The format of csv file is like below:

//File

    PointStart,PointEnd
    jay,yrt
    hiqrr,huame
    Sam,joysunn
    timka,tomdva
    ......,.....

I have import this file into R but I do not know next step to handle it.

Thanks for your help geeks.

Meng Wang
  • 29
  • 5

1 Answers1

0
  1. Use read.csv to import your data into R data frame, say d
  2. Use network package to create network object with net <- network(d, directed=TRUE) with directed set to TRUE/FALSE depending on your data.
  3. Use kcores from sna package (http://www.rdocumentation.org/packages/sna/functions/kcores): kcores(net).
Michał
  • 2,755
  • 1
  • 17
  • 20