igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] link analysis with R


From: Djamila MHB
Subject: [igraph] link analysis with R
Date: Sun, 7 Sep 2014 12:16:37 +0200

Hello
1) I have tried to apply HITS algorithm following this R manual
http://www.csc.ncsu.edu/faculty/samatova/practical-graph-mining-with-R/slides/pdf/Link_Analysis.pdf

but I cannot find the libraries: “Link Analysis “and
“ProximityMeasure” in CRAN project website:
> library(igraph)
> library(ProximityMeasure)
Error in library(ProximityMeasure) :
  there is no package called ‘ProximityMeasure’
> A<-matrix(c(0,1,1,0,0,0,1,0,1,1,1,1,0,1,0,0,0,0,0,0,1,0,1,0,0,1,1,0,0,0,0,0,1,0,0,0),nrow=6,ncol=6,byrow=TRUE)
> G<-graph.adjacency(A,mode=c("directed"),weighted=NULL)
> kmax<-6
> op<-HITS(G,kmax)
Error: could not find function "HITS"
> op
Error: object 'op' not found
2) I have also tried to apply PageRank algorithm in collaboration
networks “astro-ph.gml” but it has not worked:
> astrogr<-read.graph("F:/DataMiningavecR/astro-ph.gml","gml")
> astrogr_sub<-delete.vertices(astrogr,V(astrogr)$id[V(astrogr)$id>100])
>page.rank 
>(astrogr_sub,V(astrogr_sub),directed=FALSE,weights=E(astrogr_sub)$value)$vector
Error in match.arg(arg = arg, choices = choices, several.ok = several.ok) :
  'arg' must be of length 1
3) There also problems when I have tried to apply a pre-processing for
the graph data of “astro-ph.gml” for link prediction:
rawdataframe<-read.table("F:/DataMiningavecR/astro-ph.gml",sep="",fill=TRUE)
> begin_year<-min(rawdataframe$V3)
Warning message:
In min(rawdataframe$V3) : no non-missing arguments to min; returning Inf
> end_year<-max(rawdataframe$V3)
Warning message:
In max(rawdataframe$V3) : no non-missing arguments to max; returning –Inf
Please, could you show me where is the problem?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]