R/wordcloud.R

Defines functions wordcloud_rjs wordcloudJSON

Documented in wordcloud_rjs

#create json
wordcloudJSON<-function(data){
json <- data.frame(text = data[,1], count = data[,2])
return(toJSON(json))
}

#create html wrapper for boxplot
wordcloud_rjs<-function(data, plot = TRUE, jupyter = FALSE, dir = tempdir()){
createHTML(dir, c("d3.min.js","jspdf.min.js","functions.js","cloud.min.js","wordcloud.js"), wordcloudJSON(data), plot, jupyter)
}

Try the RJSplot package in your browser

Any scripts or data that you put into this service are public.

RJSplot documentation built on Dec. 11, 2021, 9:36 a.m.