geom_word_cloud: Create a new geom called wordcloud

Description Usage Arguments Details Examples

Description

Create a new geom called wordcloud

Usage

1
2
geom_word_cloud(mapping = NULL, data = NULL, stat = "identity",
  position = "identity", parse = FALSE, ...)

Arguments

data

data frame contains the words to visualize

Details

Set aes(x=0, y=0) as a default if the data frame only contains the words

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
words2 <- "South Korea high-energy capital moves at a pace that rivals the world busiest, with its pulsing creative energy driving innovation in music, technology and fashion.Pali pali ??? meaning quick, quick ??? is not just a favourite expression in Seoul: it is a way of life. South Korea capital moves at a pace that rivals the world's busiest cities, fostering a culture of hard work, service and just getting stuff done, residents say. It is the most high-energy, intense city I have ever lived in. I have lived in New York City and Tokyo, but Seoul beats them hands down, said Ruchika Sahai, who moved here from Sydney, Australia, nearly two years ago. Office hours stretch well past 10 pm, but the drive of the nearly 10 million residents rarely wavers. Even beyond the modern city streets, the underground markets pulse with a chaotic and old world vibe"
dats <- data.frame(words2)
qplot(0,0,data=dats,label=dats$words2) +geom_word_cloud(colour="red")

p1 <- ggplot(data=dats,aes(x=0,y=0,label=dats$words2))
p1+geom_word_cloud(colour="red")

p <- ggplot(data = mtcars, aes(x=wt, y=mpg, label=rownames(mtcars)))
p+geom_word_cloud()

# Add aesthetic mappings
p+geom_word_cloud(aes(colour=factor(cyl)))
p+geom_word_cloud(aes(colour=factor(cyl)))+scale_colour_discrete(l=40)

ikoiko88/ggwordcloud documentation built on May 18, 2019, 3:42 a.m.