Skip to content

adymimos/rWordCloud

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
R
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

rWordCloud - An htmlwidget interface to D3 word cloud

to install

require(devtools)
install_github('adymimos/rWordCloud')

d3TextCloud - Pass compelete sentence, Java script calculates word count It performs stemming and stop word removals

d3Cloud - Pass word and its size

d3TextCloud
server.R
library(rWordCloud)
function(input, output, session) {
output$d3TextCloud <- renderd3TextCloud({
   content <- c('test test1 test2 hi ho hurray hi hurray ho ho ho ho','ho hi uh ho','test')
   label <- c('a1','a2','a3')
   d3TextCloud(content = content, label = label)
  })
}

ui.R

library(rWordCloud)
fluidPage(
d3TextCloudOutput("d3TextCloud", width = "100%", height = 500)
)

output alt tag

d3Cloud
library(rWordCloud)
function(input, output, session) {
  output$d3Cloud <- renderd3Cloud({
   text <- c('d3','wordcloud','impressive','experiment','htmlwidgets','myfirstwidget')
   size <- c(25,20,13,9,6,5)
   df <- data.frame(text,size)
   d3Cloud(text = text, size = size)
  })
}



ui.R
library(solrCloud)
fluidPage(
d3CloudOutput("d3Cloud", width = "100%", height = 500)
)

Example from shiny gallery using rWordCloud - https://github.com/rstudio/shiny-examples/tree/master/082-word-cloud alt tag code - https://github.com/adymimos/rWordCloud/tree/master/inst/examples/shiny/ex2/

Interactive example - input$d3word gives you the word selected from the UI. alt tag code - https://github.com/adymimos/rWordCloud/tree/master/inst/examples/shiny/ex3/

More info in my blog - http://bigdataanalyze.blogspot.com/2015/02/rwordcloud-htmlwidget-interface-for-d3.html

About

An htmlwidget interface for d3 word cloud

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published