wordcloud/0000755000176200001440000000000012346430030012247 5ustar liggesuserswordcloud/src/0000755000176200001440000000000012346412120013036 5ustar liggesuserswordcloud/src/Makevars0000644000176200001440000000175012346354503014547 0ustar liggesusers## Use the R_HOME indirection to support installations of multiple R version PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"` ## PKG_CXXFLAGS = -O3 -fno-inline ## -fno-inline ## As an alternative, one can also add this code in a file 'configure' ## ## PKG_LIBS=`${R_HOME}/bin/Rscript -e "Rcpp:::LdFlags()"` ## ## sed -e "s|@PKG_LIBS@|${PKG_LIBS}|" \ ## src/Makevars.in > src/Makevars ## ## which together with the following file 'src/Makevars.in' ## ## PKG_LIBS = @PKG_LIBS@ ## ## can be used to create src/Makevars dynamically. This scheme is more ## powerful and can be expanded to also check for and link with other ## libraries. It should be complemented by a file 'cleanup' ## ## rm src/Makevars ## ## which removes the autogenerated file src/Makevars. ## ## Of course, autoconf can also be used to write configure files. This is ## done by a number of packages, but recommended only for more advanced users ## comfortable with autoconf and its related tools. wordcloud/src/layout.cpp0000644000176200001440000000154212346412120015061 0ustar liggesusers #include "Rcpp.h" /* * Detect if a box at position (x11,y11), with width sw11 and height sh11 overlaps * with any of the boxes in boxes1 */ using namespace Rcpp; RcppExport SEXP is_overlap(SEXP x11,SEXP y11,SEXP sw11,SEXP sh11,SEXP boxes1){ double x1 = as(x11); double y1 =as(y11); double sw1 = as(sw11); double sh1 = as(sh11); Rcpp::List boxes(boxes1); Rcpp::NumericVector bnds; double x2, y2, sw2, sh2; bool overlap= true; for (int i=0;i < boxes.size();i++) { bnds = boxes(i); x2 = bnds(0); y2 = bnds(1); sw2 = bnds(2); sh2 = bnds(3); if (x1 < x2) overlap = (x1 + sw1) > x2; else overlap = (x2 + sw2) > x1; if (y1 < y2) overlap = (overlap && ((y1 + sh1) > y2)); else overlap = (overlap && ((y2 + sh2) > y1)); if(overlap) return Rcpp::wrap(true); } return Rcpp::wrap(false); } wordcloud/src/Makevars.win0000644000176200001440000000024612346354503015342 0ustar liggesusers ## Use the R_HOME indirection to support installations of multiple R version PKG_LIBS = $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e "Rcpp:::LdFlags()") wordcloud/NAMESPACE0000644000176200001440000000016612346372753013512 0ustar liggesusersuseDynLib(wordcloud) exportPattern("^[[:alpha:]]+") import( Rcpp ) import( slam ) import(methods) import(RColorBrewer)wordcloud/NEWS0000644000176200001440000000107612346373011012757 0ustar liggesusers2.5 o updated for tm 0.6 2.4 o Changed licensing statement at the request of CRAN o Added fixed.asp option to wordcloud 2.2 o added textplot o exposed the word layout algorithm 2.0 o added commonality and comparison clouds o word coloring can be done on a per word basis (thanks to David Robinson) 1.4 o change import to include 1.2 o added random word coloring option (thank you xavier dutoit for the patch) o Fixed max.words bug (thank you Manuel Eugster and Bettina Gruen for the patch) 1.1 o Initial releasewordcloud/data/0000755000176200001440000000000012346412120013160 5ustar liggesuserswordcloud/data/SOTU.RData0000644000176200001440000007423112346356545014720 0ustar liggesusers˲$ٕV( "ɦ5 XBOd 4H`e69yDxD8{7 M$kij,IdƟ^k}7ɹ`V{z?\{o?ۏ{~#ۏ?yG佟_Z׾Gᆲvթ^>m=Wkꛡ]MOze}ø}w?ծ;xw\}Zuվnzqf[uO|Ӿ0Sw]m+j:Vj?@rjա1UTզ'~mX{{oVa5]qv.v}] 6r\/zI7mkOf\nX﻾auwЏn Ui>ypOnpK5Wx:'3bS`k^>yj?/6錅̵}TUu#PE`:=4ї ]5SiE{^{֯y락'6c 3.v̶Νfͮ|Ѷm}3ج)VnZ}}ꓺ׫f;=wWy{|y3ٳsOp[OPq>i7wwj5jhGpz;k}_Tkg{Zۆ KoaNǦw?tz٭MyuH;wwx5*?VC~28*^GkkǵŬy tJ=󴰶g`So/mVlrj\g5^a>*4:İYZٙúron|ma/+~̪_xnUoo1XazenTj!``'i)}VUams{ϭVs}z7g֤ț{;6sz0yH=}g/Is=Wx9M) i{'9]c{V<&4ې;}`k ڹ~2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dPN|DήB 7H0^DVU,]ÎNza3tlN.1B{@{)Wm`LcSC]\WyT(fn%}92>0L!A0W۟G[ b>Ǩe7h,*w7Ҩ>%o= Ge;FJ4vR93 ->X ҋ,)˰=wPҊca<̫iWGr]\;$KEz8%V汐QD6ڢDBL٨ROTHKL8b$= '} n*V嶡_V46J`0Du޼k.wvVjkB0T` <"!GEP.e!չVs-z}i*,͗GXfqݯQ^ CxʵZltKw}Q&/1+$o(?UX(zn9z[Cf 7/fLV%D)cjƯ\;`sdݑ܁ /8.{{y sR:>ܶ{/+-b8T\/1n\3wHy@hhω+09|eG]ݣLSVВRm8O6'iXgB.s dU;PQNwtUEg}JTF@6!㣉T 'H]^9K#@t量7͝PhߓvyPߧmIT$y # aDi'߄Lؘ4ԥ=э>_E"̚5;U/>ЕKHmۨQ 5TBejvx"C-{~uz(>ȱbᅥR'mKE]ž-FJ^u8.{X@ !آ'\QwǂUJh&ກGhEr*yGYYfsؔ>>`TjI]Z#׍P7ޣcn,sBȇU$B@['[ϕo=4\Σ^4 #?NUuzxuvaR =u~99 gxqx7_7HQ}rc6ZQU2lScY4.-f\{8E4#3ݬZ}:%DZf1+EЍqkG>(?2㥭 mh]S6U >B[v=]N aى>(jj ϩڡ4g/ u*UOoTVnb-*U?1Bo͝=Wb0ǷaR=@a6^o>^^~GmN{yT)e=5oq̓^x[-x m^r]o0䍱n!hyU1 x^@#GMۻg6q@Rp}R$ v"U3Sad +o`D?4G+7{ _90@Ϛq7Nzׯ_m;_?,.~]t1?Vx? ^Teڅ0) stop("Variable aspect ratio not supported for rotated words. Set rot.per=0.") tails <- "g|j|p|q|y" last <- 1 nc<- length(colors) if(missing(freq)){ if(!require("tm")) stop("freq must either be non-missing, or the tm package must be available") if(is.character(words) || is.factor(words)){ corpus <- Corpus(VectorSource(words)) corpus <- tm_map(corpus, removePunctuation) corpus <- tm_map(corpus, function(x)removeWords(x,stopwords())) }else corpus <- words tdm <- TermDocumentMatrix(corpus) freq <- slam::row_sums(tdm) words <- names(freq) } if (ordered.colors) { if (length(colors) != 1 && length(colors) != length(words)) { stop(paste("Length of colors does not match length of words", "vector")) } } if(min.freq > max(freq)) min.freq <- 0 overlap <- function(x1, y1, sw1, sh1) { if(!use.r.layout) return(.overlap(x1,y1,sw1,sh1,boxes)) s <- 0 if (length(boxes) == 0) return(FALSE) for (i in c(last,1:length(boxes))) { bnds <- boxes[[i]] x2 <- bnds[1] y2 <- bnds[2] sw2 <- bnds[3] sh2 <- bnds[4] if (x1 < x2) overlap <- x1 + sw1 > x2-s else overlap <- x2 + sw2 > x1-s if (y1 < y2) overlap <- overlap && (y1 + sh1 > y2-s) else overlap <- overlap && (y2 + sh2 > y1-s) if(overlap){ last <<- i return(TRUE) } } FALSE } ord <- rank(-freq, ties.method = "random") words <- words[ord<=max.words] freq <- freq[ord<=max.words] if (ordered.colors) { colors <- colors[ord<=max.words] } if(random.order) ord <- sample.int(length(words)) else ord <- order(freq,decreasing=TRUE) words <- words[ord] freq <- freq[ord] words <- words[freq>=min.freq] freq <- freq[freq>=min.freq] if (ordered.colors) { colors <- colors[ord][freq>=min.freq] } thetaStep <- .1 rStep <- .05 plot.new() op <- par("mar") par(mar=c(0,0,0,0)) if(fixed.asp) plot.window(c(0,1),c(0,1),asp=1) else plot.window(c(0,1),c(0,1)) normedFreq <- freq/max(freq) size <- (scale[1]-scale[2])*normedFreq + scale[2] boxes <- list() for(i in 1:length(words)){ rotWord <- runif(1)0 && y1-.5*ht>0 && x1+.5*wid<1 && y1+.5*ht<1){ if (!random.color) { if (ordered.colors) { cc <- colors[i] } else { cc <- ceiling(nc*normedFreq[i]) cc <- colors[cc] } } else { cc <- colors[sample(1:nc,1)] } text(x1,y1,words[i],cex=size[i],offset=0,srt=rotWord*90, col=cc,...) #rect(x1-.5*wid,y1-.5*ht,x1+.5*wid,y1+.5*ht) boxes[[length(boxes)+1]] <- c(x1-.5*wid,y1-.5*ht,wid,ht) isOverlaped <- FALSE }else{ if(r>sqrt(.5)){ warning(paste(words[i], "could not be fit on page. It will not be plotted.")) isOverlaped <- FALSE } theta <- theta+thetaStep r <- r + rStep*thetaStep/(2*pi) x1 <- .5+r*cos(theta) y1 <- .5+r*sin(theta) } } } par(mar=op) invisible() } #Call down to c++ to find out if any overplotting would occur .overlap <- function(x11,y11,sw11,sh11,boxes1){ .Call("is_overlap",x11,y11,sw11,sh11,boxes1) } #a word cloud showing the common words among documents commonality.cloud <- function(term.matrix,comonality.measure=min,max.words=300,...){ ndoc <- ncol(term.matrix) for(i in 1:ndoc){ term.matrix[,i] <- term.matrix[,i] / sum(term.matrix[,i]) } freq <- apply(term.matrix,1,function(x) comonality.measure(x)) freq <- freq + min(freq) wordcloud(rownames(term.matrix)[freq>0],freq[freq>0],min.freq=0,max.words=max.words,...) } #a cloud comparing the frequencies of words across documents comparison.cloud <- function(term.matrix,scale=c(4,.5),max.words=300,random.order=FALSE, rot.per=.1,colors=brewer.pal(ncol(term.matrix),"Dark2"),use.r.layout=FALSE,title.size=3,...) { ndoc <- ncol(term.matrix) thetaBins <- seq(from=0,to=2*pi,length=ndoc+1) for(i in 1:ndoc){ term.matrix[,i] <- term.matrix[,i] / sum(term.matrix[,i]) } mean.rates <- rowMeans(term.matrix) for(i in 1:ndoc){ term.matrix[,i] <- term.matrix[,i] - mean.rates } group <- apply(term.matrix,1,function(x) which.max(x)) words <- rownames(term.matrix) freq <- apply(term.matrix,1,function(x) max(x)) tails <- "g|j|p|q|y" last <- 1 nc<- length(colors) overlap <- function(x1, y1, sw1, sh1) { if(!use.r.layout) return(.overlap(x1,y1,sw1,sh1,boxes)) s <- 0 if (length(boxes) == 0) return(FALSE) for (i in c(last,1:length(boxes))) { bnds <- boxes[[i]] x2 <- bnds[1] y2 <- bnds[2] sw2 <- bnds[3] sh2 <- bnds[4] if (x1 < x2) overlap <- x1 + sw1 > x2-s else overlap <- x2 + sw2 > x1-s if (y1 < y2) overlap <- overlap && (y1 + sh1 > y2-s) else overlap <- overlap && (y2 + sh2 > y1-s) if(overlap){ last <<- i return(TRUE) } } FALSE } ord <- rank(-freq, ties.method = "random") words <- words[ord<=max.words] freq <- freq[ord<=max.words] group <- group[ord<=max.words] if(random.order){ ord <- sample.int(length(words)) }else{ ord <- order(freq,decreasing=TRUE) } words <- words[ord] freq <- freq[ord] group <- group[ord] thetaStep <- .05 rStep <- .05 plot.new() op <- par("mar") par(mar=c(0,0,0,0)) plot.window(c(0,1),c(0,1),asp=1) normedFreq <- freq/max(freq) size <- (scale[1]-scale[2])*normedFreq + scale[2] boxes <- list() #add titles docnames <- colnames(term.matrix) for(i in 1:ncol(term.matrix)){ th <- mean(thetaBins[i:(i+1)]) word <- docnames[i] wid <- strwidth(word,cex=title.size)*1.2 ht <- strheight(word,cex=title.size)*1.2 x1 <- .5+.45*cos(th) y1 <- .5+.45*sin(th) rect(x1-.5*wid,y1-.5*ht,x1+.5*wid,y1+.5*ht,col="grey90", border="transparent") text(x1,y1,word,cex=title.size) boxes[[length(boxes)+1]] <- c(x1-.5*wid,y1-.5*ht,wid,ht) } for(i in 1:length(words)){ rotWord <- runif(1) thetaBins[group[i]] && theta < thetaBins[group[i]+1] if(inCorrectRegion && !overlap(x1-.5*wid,y1-.5*ht,wid,ht) && x1-.5*wid>0 && y1-.5*ht>0 && x1+.5*wid<1 && y1+.5*ht<1){ text(x1,y1,words[i],cex=size[i],offset=0,srt=rotWord*90, col=colors[group[i]],...) #rect(x1-.5*wid,y1-.5*ht,x1+.5*wid,y1+.5*ht) boxes[[length(boxes)+1]] <- c(x1-.5*wid,y1-.5*ht,wid,ht) isOverlaped <- FALSE }else{ if(r>sqrt(.5)){ warning(paste(words[i], "could not be fit on page. It will not be plotted.")) isOverlaped <- FALSE } theta <- theta+thetaStep if(theta>2*pi) theta <- theta - 2*pi r <- r + rStep*thetaStep/(2*pi) x1 <- .5+r*cos(theta) y1 <- .5+r*sin(theta) } } } par(mar=op) invisible() } wordlayout <- function(x, y, words, cex=1, rotate90 = FALSE, xlim=c(-Inf,Inf), ylim=c(-Inf,Inf), tstep=.1, rstep=.1, ...){ tails <- "g|j|p|q|y" n <- length(words) sdx <- sd(x,na.rm=TRUE) sdy <- sd(y,na.rm=TRUE) if(sdx==0) sdx <- 1 if(sdy==0) sdy <- 1 if(length(cex)==1) cex <- rep(cex,n) if(length(rotate90)==1) rotate90 <- rep(rotate90,n) boxes <- list() for(i in 1:length(words)){ rotWord <- rotate90[i] r <-0 theta <- runif(1,0,2*pi) x1 <- xo <- x[i] y1 <- yo <- y[i] wid <- strwidth(words[i],cex=cex[i],...) ht <- strheight(words[i],cex=cex[i],...) #mind your ps and qs if(grepl(tails,words[i])) ht <- ht + ht*.2 if(rotWord){ tmp <- ht ht <- wid wid <- tmp } isOverlaped <- TRUE while(isOverlaped){ if(!.overlap(x1-.5*wid,y1-.5*ht,wid,ht,boxes) && x1-.5*wid>xlim[1] && y1-.5*ht>ylim[1] && x1+.5*widxl+w || y[i]yl+h){ points(x[i],y[i],pch=16,col="red",cex=.5) nx <- xl+.5*w ny <- yl+.5*h lines(c(x[i],nx),c(y[i],ny),col="grey") } } } text(lay[,1]+.5*lay[,3],lay[,2]+.5*lay[,4],words,cex=cex,...) } wordcloud/MD50000644000176200001440000000133512346430030012561 0ustar liggesusers4a54dfaff08714092c5072643c96743b *DESCRIPTION 8284da5e479a74fa754fcf3c84ff892b *LICENSE.note 6d95de4163c1c95b85c334d0fa3c0d76 *NAMESPACE 4f0752c5608093bf5612d3e119811baa *NEWS 91a6c2ffbc7b2d2bbd91aa6e05a5d4f1 *R/cloud.R 7c93d9086a9e6f9bf31c089d0f2c2218 *data/SOTU.RData 3d266ced655fd8e2ee9d595b040ecd7f *man/SOTU.Rd d197ded3ed2edffce4cd8dd112b68d41 *man/commonality.cloud.Rd b3733cd7a8c86c2f6e066209bef8ad6c *man/comparison.cloud.Rd 7f8d87796dc5b595c2f882793ff146dc *man/textplot.Rd a4b347045b28b60283a5958df1f07e92 *man/wordcloud.Rd 50135c1c9f9afccac5df67d9b79cced9 *man/wordlayout.Rd 7d1edbf8c19a506fba0358e3164772dd *src/Makevars a35f3ddab1424169b08532625497ba02 *src/Makevars.win b8b9002c9bad2f48e7b61c814ddea5aa *src/layout.cpp wordcloud/DESCRIPTION0000644000176200001440000000102612346430030013754 0ustar liggesusersPackage: wordcloud Type: Package Title: Word Clouds Version: 2.5 Date: 2013-04-11 Author: Ian Fellows Maintainer: Ian Fellows Description: Pretty word clouds. License: LGPL-2.1 LazyLoad: yes Depends: methods, RColorBrewer Imports: slam, Rcpp (>= 0.9.4) Suggests: tm (>= 0.6) URL: http://blog.fellstat.com/?cat=11 http://www.fellstat.com http://research.cens.ucla.edu/ LinkingTo: Rcpp Packaged: 2014-06-12 20:57:52 UTC; ianfellows NeedsCompilation: yes Repository: CRAN Date/Publication: 2014-06-13 00:56:24 wordcloud/LICENSE.note0000644000176200001440000000014312023425540014220 0ustar liggesusersThe SOTU data set was produced by the U.S. federal government and is released to the public domain.wordcloud/man/0000755000176200001440000000000012346412120013022 5ustar liggesuserswordcloud/man/comparison.cloud.Rd0000644000176200001440000000364512346411643016611 0ustar liggesusers\name{comparison.cloud} \alias{comparison.cloud} \title{ Plot a comparison cloud } \description{ Plot a cloud comparing the frequencies of words across documents. } \usage{ comparison.cloud(term.matrix,scale=c(4,.5),max.words=300, random.order=FALSE,rot.per=.1, colors=brewer.pal(ncol(term.matrix),"Dark2"), use.r.layout=FALSE,title.size=3,...) } \arguments{ \item{term.matrix}{A term frequency matrix whose rows represent words and whose columns represent documents.} \item{scale}{A vector of length 2 indicating the range of the size of the words. } \item{max.words}{Maximum number of words to be plotted. least frequent terms dropped} \item{random.order}{plot words in random order. If false, they will be plotted in decreasing frequency} \item{rot.per}{proportion words with 90 degree rotation} \item{colors}{color words from least to most frequent} \item{use.r.layout}{if false, then c++ code is used for collision detection, otherwise R is used} \item{title.size}{Size of document titles} \item{...}{Additional parameters to be passed to text (and strheight,strwidth).} } \details{ Let \eqn{p_{i,j}} be the rate at which word i occurs in document j, and \eqn{p_j} be the average across documents(\eqn{\sum_ip_{i,j}/ndocs}). The size of each word is mapped to its maximum deviation ( \eqn{max_i(p_{i,j}-p_j)} ), and its angular position is determined by the document where that maximum occurs. } \value{ nothing } \examples{ if(require(tm)){ data(SOTU) corp <- SOTU corp <- tm_map(corp, removePunctuation) corp <- tm_map(corp, content_transformer(tolower)) corp <- tm_map(corp, removeNumbers) corp <- tm_map(corp, function(x)removeWords(x,stopwords())) term.matrix <- TermDocumentMatrix(corp) term.matrix <- as.matrix(term.matrix) colnames(term.matrix) <- c("SOTU 2010","SOTU 2011") comparison.cloud(term.matrix,max.words=40,random.order=FALSE) commonality.cloud(term.matrix,max.words=40,random.order=FALSE) } } wordcloud/man/wordcloud.Rd0000644000176200001440000000653412346412003015323 0ustar liggesusers% % TODO: Write Documentation % \name{wordcloud} \alias{wordcloud} \title{ Plot a word cloud } \description{ Plot a word cloud } \usage{ wordcloud(words,freq,scale=c(4,.5),min.freq=3,max.words=Inf, random.order=TRUE, random.color=FALSE, rot.per=.1, colors="black",ordered.colors=FALSE,use.r.layout=FALSE, fixed.asp=TRUE, ...) } \arguments{ \item{words}{the words} \item{freq}{their frequencies} \item{scale}{A vector of length 2 indicating the range of the size of the words. } \item{min.freq}{words with frequency below min.freq will not be plotted} \item{max.words}{Maximum number of words to be plotted. least frequent terms dropped} \item{random.order}{plot words in random order. If false, they will be plotted in decreasing frequency} \item{random.color}{choose colors randomly from the colors. If false, the color is chosen based on the frequency} \item{rot.per}{proportion words with 90 degree rotation} \item{colors}{color words from least to most frequent} \item{ordered.colors}{if true, then colors are assigned to words in order} \item{use.r.layout}{if false, then c++ code is used for collision detection, otherwise R is used} \item{fixed.asp}{if TRUE, the aspect ratio is fixed. Variable aspect ratio only supported if rot.per==0} \item{...}{Additional parameters to be passed to text (and strheight,strwidth).} } \details{ If freq is missing, then words can either be a character vector, or Corpus. If it is a vector and freq is missing, standard stop words will be removed prior to plotting. } \value{ nothing } \seealso{ \code{\link{text}} } \examples{ wordcloud(c(letters, LETTERS, 0:9), seq(1, 1000, len = 62)) if(require(tm)){ ##### from character ##### wordcloud( "Many years ago the great British explorer George Mallory, who was to die on Mount Everest, was asked why did he want to climb it. He said, \"Because it is there.\" Well, space is there, and we're going to climb it, and the moon and the planets are there, and new hopes for knowledge and peace are there. And, therefore, as we set sail we ask God's blessing on the most hazardous and dangerous and greatest adventure on which man has ever embarked.", ,random.order=FALSE) \dontrun{ data(crude) crude <- tm_map(crude, removePunctuation) crude <- tm_map(crude, function(x)removeWords(x,stopwords())) ##### from corpus ##### wordcloud(crude) ##### from frequency counts ##### tdm <- TermDocumentMatrix(crude) m <- as.matrix(tdm) v <- sort(rowSums(m),decreasing=TRUE) d <- data.frame(word = names(v),freq=v) wordcloud(d$word,d$freq) #A bigger cloud with a minimum frequency of 2 wordcloud(d$word,d$freq,c(8,.3),2) #Now lets try it with frequent words plotted first wordcloud(d$word,d$freq,c(8,.5),2,,FALSE,.1) ##### with colors ##### if(require(RColorBrewer)){ pal <- brewer.pal(9,"BuGn") pal <- pal[-(1:4)] wordcloud(d$word,d$freq,c(8,.3),2,,FALSE,,.15,pal) pal <- brewer.pal(6,"Dark2") pal <- pal[-(1)] wordcloud(d$word,d$freq,c(8,.3),2,,TRUE,,.15,pal) #random colors wordcloud(d$word,d$freq,c(8,.3),2,,TRUE,TRUE,.15,pal) } ##### with font ##### wordcloud(d$word,d$freq,c(8,.3),2,,TRUE,,.15,pal, vfont=c("gothic english","plain")) wordcloud(d$word,d$freq,c(8,.3),2,100,TRUE,,.15,pal,vfont=c("script","plain")) wordcloud(d$word,d$freq,c(8,.3),2,100,TRUE,,.15,pal,vfont=c("serif","plain")) } } } wordcloud/man/wordlayout.Rd0000644000176200001440000000246412346354504015543 0ustar liggesusers \name{wordlayout} \alias{wordlayout} \title{ Word Layout } \description{ finds text plot layout coordinates such that no text overlaps } \usage{ wordlayout(x, y, words, cex=1, rotate90 = FALSE, xlim=c(-Inf,Inf), ylim=c(-Inf,Inf), tstep=.1, rstep=.1, ...) } \arguments{ \item{x}{x coordinates} \item{y}{y coordinates} \item{words}{the text to plot} \item{cex}{font size} \item{rotate90}{a value or vector indicating whether words should be rotated 90 degrees} \item{xlim}{x axis bounds for text} \item{ylim}{y axis bounds for text} \item{tstep}{the angle (theta) step size as the algorithm spirals out} \item{rstep}{the radius step size (in standard deviations) as the algorithm spirals out} \item{...}{Additional parameters to be passed to strwidth and strheight.} } \value{ A matrix with columns representing x, y width and height. } \examples{ #calculate standardized MDS coordinates dat <- sweep(USArrests,2,colMeans(USArrests)) dat <- sweep(dat,2,sqrt(diag(var(dat))),"/") loc <- cmdscale(dist(dat)) x <- loc[,1] y <- loc[,2] w <- rownames(loc) #plot with no overlap and all words visible plot(x,y,type="n",xlim=c(-3,3),ylim=c(-3,2)) lay <- wordlayout(x,y,w,xlim=c(-3,3),ylim=c(-3,2)) text(lay[,1]+.5*lay[,3],lay[,2]+.5*lay[,4],w) #notice north dakota is only partially visible textplot(x,y,w) } wordcloud/man/commonality.cloud.Rd0000644000176200001440000000221512346360045016761 0ustar liggesusers\name{commonality.cloud} \alias{commonality.cloud} \title{ Plot a commonality cloud } \description{ Plot a cloud of words shared across documents } \usage{ commonality.cloud(term.matrix,comonality.measure=min,max.words=300,...) } \arguments{ \item{term.matrix}{A term frequency matrix whose rows represent words and whose columns represent documents.} \item{comonality.measure}{A function taking a vector of frequencies for a single term, and returning a common frequency} \item{max.words}{Maximum number of words to be plotted. least frequent terms dropped} \item{...}{Additional parameters to be passed to wordcloud.} } \value{ nothing } \examples{ if(require(tm)){ data(SOTU) corp <- SOTU corp <- tm_map(corp, removePunctuation) corp <- tm_map(corp, content_transformer(tolower)) corp <- tm_map(corp, removeNumbers) corp <- tm_map(corp, function(x)removeWords(x,stopwords())) term.matrix <- TermDocumentMatrix(corp) term.matrix <- as.matrix(term.matrix) colnames(term.matrix) <- c("SOTU 2010","SOTU 2011") comparison.cloud(term.matrix,max.words=40,random.order=FALSE) commonality.cloud(term.matrix,max.words=40,random.order=FALSE) } }wordcloud/man/SOTU.Rd0000644000176200001440000000043612346354504014121 0ustar liggesusers% % TODO: Write Documentation % \name{SOTU} \docType{data} \title{United States State of the Union Addresses (2010 and 2011)} \alias{SOTU} \alias{SOTU} \description{ Transcripts of the state of the union speeches. saved as a tm Corpus. } \author{ Barack Obama } \usage{data(SOTU)} wordcloud/man/textplot.Rd0000644000176200001440000000221112346354504015203 0ustar liggesusers\name{textplot} \alias{textplot} \title{ Text Plot } \description{ An x y plot of non-overlapping text } \usage{ textplot(x, y, words, cex=1,new=TRUE, show.lines=TRUE, ...) } \arguments{ \item{x}{x coordinates} \item{y}{y coordinates} \item{words}{the text to plot} \item{cex}{font size} \item{new}{should a new plot be created} \item{show.lines}{if true, then lines are plotted between x,y and the word, for those words not covering their x,y coordinates} \item{...}{Additional parameters to be passed to wordlayout and text.} } \value{ nothing } \examples{ #calculate standardized MDS coordinates dat <- sweep(USArrests,2,colMeans(USArrests)) dat <- sweep(dat,2,sqrt(diag(var(dat))),"/") loc <- cmdscale(dist(dat)) #plot with no overlap textplot(loc[,1],loc[,2],rownames(loc)) #scale by urban population size textplot(loc[,1],loc[,2],rownames(loc),cex=USArrests$UrbanPop/max(USArrests$UrbanPop)) #x limits sets x bounds of plot, and forces all words to be in bounds textplot(loc[,1],loc[,2],rownames(loc),xlim=c(-3.5,3.5)) #compare to text (many states unreadable) plot(loc[,1],loc[,2],type="n") text(loc[,1],loc[,2],rownames(loc)) }