Hi everyone,
  
     I'm writting a script that will open multiple files in a  single folder 
and then will do some calculations to finally save  everything in a big table.
   So here  is the pseudo code
  
  #read all files in the given directory
  myfiles <-list.files("c:\\myDir")
  
  #initialize table
  ???
  
  #loop through files
  for(f in myfiles[-1]) {
    netMat <- read.table( f, sep" " )
    netMat <-as.matrix(netMat)
  
   # calculate the needed Stats
   gden(netMat)->density
   centralization(netMat, degree) -> Gdegree
   centralization(netMat, betweenness) -> Gbetweenness
   centralization(netMat, closeness) -> Gcloseness
  
  #store into table
  ????
  
  }
  
    So my questions are two
  
   First how can I initialize the table (it will be a 4 X 1001 table) without 
filling it out first. 
  Second how can I store each value in the table (i.e. in each round I'll  be 
adding one full column with density and the 3 different  centralizations)?
  
  thks
  
  -Cuau
  
  
  
                
---------------------------------


        [[alternative HTML version deleted]]

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to