Thursday, 7 November 2013

Have been exploring using R for Social Network Analysis.

This is what I have found so far.

If data received is in Gephi format, using Gephi it can be converted into CSV format and then would be ready for being input to R.

What needs to be watched in this simple transaction this:

1.  What separator Gephi uses by default to separate CSV value?

2.  What are the column headings and whether Gephi, while converting data to CSV, stores the data with headers?  If yes then what type, if no - how do you get headers in

3.  Then while reading into R, make sure to identify and tell R what separator to expect sep=";" for example.  R assumes " " space as the default separator many times

4.  Next make sure you tell R to expect headers, i.e. Header=T.  Do not say Header="T" otherwise you will get an error

5.  Although the above are very basic steps, especially if you have done some work with R, still these little things have a tendency to boomerang if sufficient care is not taken

Alright, next challenge is to add relevant headers to the data file after reading it into R,  since in many cases that does not happen by the time data comes into R.

Thinking what is the big deal about it?

Huh ... everything in life is not a glorious task ... very often the tasks one is required to do frequently and repeatedly are the ones that are most boring, dull and uninspiring ...

If you ask me, adding relevant headings to data read into R, especially that containing 100's of columns, belongs just there.

Anyways .... more later.

No comments:

Post a Comment