简体   繁体   English

R- 从 dataframe 中的列制作词云

[英]R- Make a word cloud from column in dataframe

How can I make a word cloud from a column in my dataframe (it contains some english words)?如何从我的 dataframe (它包含一些英文单词)中的列中制作词云?

Which package should I download?我应该下载哪个 package?

And how do I safe the image as either a jpeg or png file?以及如何将图像保存为 jpeg 或 png 文件?

Thanks in advance!提前致谢!

A quick search on google with these terms用这些术语在谷歌上快速搜索

word cloud r-project package

will give you at least three packages on the first page:会在第一页给你至少三个包:

Which package you should use depends on what you exactly need.您应该使用哪种 package 取决于您的确切需求。 Since you mentioned that your data is organised in a data frame, I recommend that you start looking at ggwordcloud.既然您提到您的数据是在数据框中组织的,我建议您开始查看 ggwordcloud。 It works with data frames and, usually, plots based on ggplot are prettier.它适用于数据框,通常基于 ggplot 的图更漂亮。

For further details, please refer to the documentation of the package.有关详细信息,请参阅 package 的文档。 If you have any trouble with that, you are welcome to ask.如果您对此有任何问题,欢迎您提出。 But some of the examples are quite self-explanatory and you shouldn't have any trouble with them.但是其中一些例子是不言自明的,你不应该对它们有任何麻烦。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM