for(j in 1:12){ di <- ifelse(TF[,j+1]==0,0,TF[,j+1]/S[j+1]*log(12/P)) or <- order(di,decreasing=TRUE) ro <- invPerm(or) names(di) <- N cat("\n",j,":\n") print(di[or][1:10]) ff <- round(200000/sqrt(1+ro)) df <- data.frame(N=N[or],f=ff[or]) wc <- wordcloud2(df,size=0.8,minRotation=0,maxRotation=0) tmp <- paste("tmp",j,".html",sep="") pdf <- paste("fig",j,".pdf",sep="") png <- paste("fig",j,".png",sep="") saveWidget(wc,tmp,selfcontained=FALSE) webshot(tmp,pdf,delay=5,vwidth=800,vheight=600) webshot(tmp,png,delay=5,vwidth=800,vheight=600) }
January, February
March, April
May, June
July, August
September, October
November, December