<$BlogRSDURL$>
Christina's LIS Rant
Friday, December 05, 2008
  Some notes for Pajek > R > iGraph
These are mostly so I can find them again (argh)....
Install R, package iGraph, Pajek

In Pajek "locate" R:
tools > R > locate R ... look in c: > program files > R > R-2.7.1 > bin > Rgui.exe (your mileage and R version may vary)

Load your data into Pajek (with a .net, under networks click on the folder)
Do whatever manipulations in Pajek that you want to do (drop isolates, it's much easier in Pajek)
Tools > R > Send to R > Current network

If you had a version of R open, it will open another. No point in opening R first. When R opens, you'll have the information from pajek:
######################################
R called from Pajek
http://vlado.fmf.uni-lj.si/pub/networks/pajek/
Vladimir Batagelj & Andrej Mrvar
University of Ljubljana, Slovenia
-----------------------------------------------------------------------
The following networks/matrices read:
n1 : C:/Documents and Settings/...(1182)

Use objects() to get list of available objects
Use comment(?) to get information about selected object
Use savevector(v?,'???.vec') to save vector to Pajek input file
Use savematrix(n?,'???.net') to save matrix to Pajek input file (.MAT)
savematrix(n?,'???.net',2) to request a 2-mode matrix (.MAT)
Use savenetwork(n?,'???.net') to save matrix to Pajek input file (.NET)
savenetwork(n?,'???.net',2) to request a 2-mode network (.NET)
Use v?<-loadvector('???.vec') to load vector(s) from Pajek input file
Use n?<-loadmatrix('???.mat') to load matrix from Pajek input file
-----------------------------------------------------------------------


It's actually called n1 (yes, they say this, but...)

load the igraph package (packages > load)

You now have to make your adjacency matrix into a "graph"

g<-graph.adjacency(n1, mode=c("directed"), weighted=NULL, diag=TRUE, add.colnames=NULL, add.rownames=NA)

then you can sort of cookbook from the igraph page.... use their models and their in-progress tutorial book

Oh and name everything you call, I just did the community detection and forgot to add the name<- in front of it

Labels:

 
Comments:
Excellent, thank you. Just what I was looking for...!
 
Ecellent, thank you very much! Just what I was looking for...
 
Post a Comment


Links to this post:

Create a Link

Powered by Blogger

This is my blog on library and information science. I'm into Sci/Tech libraries, special libraries, personal information management, sci/tech scholarly comms.... My name is Christina Pikas and I'm a librarian in a physics, astronomy, math, computer science, and engineering library. I'm also a doctoral student at Maryland. Any opinions expressed here are strictly my own and do not necessarily reflect those of my employer or CLIS. You may reach me via e-mail at cpikas {at} gmail {dot} com.

Site Feed (ATOM)

Add to My Yahoo!

Creative Commons License
Christina's LIS Rant by Christina K. Pikas is licensed under a Creative Commons Attribution 3.0 United States License.

Christina Kirk Pikas

Laurel , Maryland , 20707 USA
Most Recent Posts
-- 4th IEEE eScience Conference: Detecting Communitie...
-- Readings completed this week
-- Comprehensive Exam Readings
-- Great example of data quality issues
-- Some rules to help build trust quickly in virtual ...
-- Is there any value in blogging when you get no com...
-- Google alerts now available in RSS
-- ASIST2008: Final Sessions
-- ASIST2008: Trends of Schools and the Fields
-- ASIST2008: The Office
ARCHIVES
02/01/2004 - 03/01/2004 / 03/01/2004 - 04/01/2004 / 04/01/2004 - 05/01/2004 / 05/01/2004 - 06/01/2004 / 06/01/2004 - 07/01/2004 / 07/01/2004 - 08/01/2004 / 08/01/2004 - 09/01/2004 / 09/01/2004 - 10/01/2004 / 10/01/2004 - 11/01/2004 / 11/01/2004 - 12/01/2004 / 12/01/2004 - 01/01/2005 / 01/01/2005 - 02/01/2005 / 02/01/2005 - 03/01/2005 / 03/01/2005 - 04/01/2005 / 04/01/2005 - 05/01/2005 / 05/01/2005 - 06/01/2005 / 06/01/2005 - 07/01/2005 / 07/01/2005 - 08/01/2005 / 08/01/2005 - 09/01/2005 / 09/01/2005 - 10/01/2005 / 10/01/2005 - 11/01/2005 / 11/01/2005 - 12/01/2005 / 12/01/2005 - 01/01/2006 / 01/01/2006 - 02/01/2006 / 02/01/2006 - 03/01/2006 / 03/01/2006 - 04/01/2006 / 04/01/2006 - 05/01/2006 / 05/01/2006 - 06/01/2006 / 06/01/2006 - 07/01/2006 / 07/01/2006 - 08/01/2006 / 08/01/2006 - 09/01/2006 / 09/01/2006 - 10/01/2006 / 10/01/2006 - 11/01/2006 / 11/01/2006 - 12/01/2006 / 12/01/2006 - 01/01/2007 / 01/01/2007 - 02/01/2007 / 02/01/2007 - 03/01/2007 / 03/01/2007 - 04/01/2007 / 04/01/2007 - 05/01/2007 / 05/01/2007 - 06/01/2007 / 06/01/2007 - 07/01/2007 / 07/01/2007 - 08/01/2007 / 08/01/2007 - 09/01/2007 / 09/01/2007 - 10/01/2007 / 10/01/2007 - 11/01/2007 / 11/01/2007 - 12/01/2007 / 12/01/2007 - 01/01/2008 / 01/01/2008 - 02/01/2008 / 02/01/2008 - 03/01/2008 / 03/01/2008 - 04/01/2008 / 04/01/2008 - 05/01/2008 / 05/01/2008 - 06/01/2008 / 06/01/2008 - 07/01/2008 / 07/01/2008 - 08/01/2008 / 08/01/2008 - 09/01/2008 / 09/01/2008 - 10/01/2008 / 10/01/2008 - 11/01/2008 / 11/01/2008 - 12/01/2008 / 12/01/2008 - 01/01/2009 / 01/01/2009 - 02/01/2009 / 02/01/2009 - 03/01/2009 / 03/01/2009 - 04/01/2009 / 04/01/2009 - 05/01/2009 / 05/01/2009 - 06/01/2009 / 08/01/2010 - 09/01/2010 /

Some of what I'm scanning

Locations of visitors to this page

Search this site
(gigablast)

(google api)
How this works

Where am I?

N 39 W 76