Displaying 1 result from an estimated 1 matches for "pattern_adj".
2012 Aug 14
1
Help needed in reading matlab files
...try to set up a loop for 265 matlab adj matrix, each number representing a specific week and the purpose being to have metrics from igraph being generated over the 265 weeks.
Thank you
CODE to read the file:
rm(list=ls())
library(R.matlab)
path<-setwd("V:/2012/nonweighted_GOVSOV")
pattern_adj<-sprintf("weightmatrix1.mat")
pathnames_adj<-list.files(pattern=pattern_adj,path=path,full.names=T)
cat("Reading MAT file: ", basename(pathnames_adj), "\n", sep="")
mat_adj<-readMat(pathnames_adj)
adj<-do.call(rbind,mat_adj)
library(igraph)
g<-...