r2d3 (version 1.0)

jsonWordCloud: Data to word frequency json

Description

Creates a json file of word frequencies. This json will work with D3 Word Cloud

Usage

jsonWordCloud(words, freq = NULL)

Arguments

words
A list of the words. Either a full list. Or a unique list and use the freq argument
freq
Optional a list of frequencies for the words

Examples

Run this code
words=c("big", "data", "machine", "learning", "wordcloud", "R", "d3js", "algorithm", "analytics", "science", "API")
freq=c(50, 50, 30, 30, 100, 10, 10, 10, 5, 5, 5 )
json<-jsonWordCloud(words, freq)

Run the code above in your browser using DataCamp Workspace