====== Equivalence of journal titles ====== 7. September 2013 / 24-26. August 2013 In R make from WJ.net a CSV file with list of all journal titles. On 7. September an improved version was made with adding the code of each journal: > setwd("E:/Data/Centrality/net") > Code <- function(x) paste(substr(unlist(strsplit(x," ")),1,1),collapse="") > net <- file("../WoS/WJ.net","r") > L <- readLines(net,n=1); L <- readLines(net,n=1) > unlist(strsplit(L,"[[:space:]]+")) [1] "*vertices" "1044802" "996348" > LL <- unlist(strsplit(L,"[[:space:]]+")) > n1 <- as.integer(LL[3]); n <- as.integer(LL[2]); n2 <- n-n1 > c(n,n1,n2) [1] 1044802 996348 48454 > S <- as.data.frame(scan(net,skip=n1,nlines=n2,what=list("",""))) Read 48454 records > close(net) > names(S) <- c("vtx","lab") > cod <- character(n2) > for(i in 1:n2) cod[i] <- Code(as.character(S$lab[i])) > T <- data.frame(num=1:n2,par=1:n2,vtx=as.integer(as.character(S$vtx)), + cod=as.character(cod),lab=as.character(S$lab)) > head(T) num par vtx cod lab 1 1 1 996349 * ***** 2 2 2 996350 PIP P IEEE PIMRC 3 3 3 996351 IWC IEEE WIREL COMMUN 4 4 4 996352 IJSAC IEEE J SEL AREA COMM 5 5 5 996353 SSMSI SIMUL-TRANS SOC MODEL SIMUL I 6 6 6 996354 IP IEEE POTENTIALS > write.csv2(T,file="journalsC.csv",row.names=FALSE) > save(T,file="journalsC.Rdata") Use Excel to make a partition (assign the same number to equivalent journals) and save it as ''journalsPart.csv''. Using R create the corresponding Pajek's partition ''journals.clu'': > S <- read.csv2(file="journalsPart.csv") > head(S) num par vtx cod lab 1 1 1 995784 * ****** 2 2 2 995785 PIP P IEEE PIMRC 3 3 3 995786 IWC IEEE WIREL COMMUN 4 4 4 995787 IJSAC IEEE J SEL AREA COMM 5 5 5 995788 SSMSI SIMUL-TRANS SOC MODEL SIMUL I 6 6 6 995789 IP IEEE POTENTIALS > n1 <- 995783 > P <- c(rep(0,n1),S$par) > clu <- file("Journals.clu","w") > cat("% jornals partition - ",date(),"\n",file=clu) > cat("*vertices ",n1+nrow(S),P,sep="\n",file=clu); close(clu) Using Pajek shrink the WJ network.