原始数据:

程序:

#统计词频
library(wordcloud) # F:/master2017/ch4/weibo170.cut.txt text <- readLines("F:/master2017/ch4/weibo170.cut.txt")
txtList <- lapply(txt, strsplit," ")
txtChar <- unlist(txtList)
txtChar <- gsub(pattern = "\"", replacement = "", txtChar)
data <- as.data.frame(table(txtChar))
ordfreq <- data[order(data$freq,decreasing = T),]
ordfreq colors=brewer.pal(9,"Set1")
wordcloud(words=ordfreq$word,freq=ordfreq$freq,min.freq=1,
scale=c(3,.5),max.words=500,colors=colors
)

结果:  

原始文件:weibo170.cut.txt

"南航" "急救门" "其实" "里面" "很多" "事" "外行" "根本" "不" "了解" "120" "999" "区别" "医生" "南航" "工作人员" "抬" "人" "都" "讳莫如深" "了解" "根本原因" "才" "谈得上" "解决" "看热闹"
"看了" "报道" "后" "内心" "震撼" "气愤" "伤痛" "上帝" "上帝" "下场" "幸好" "这位" "旅客" "还会" "爬行" "庆幸" "万幸" "真能" "误治" "失去" "生命" "相关" "人员" "不要" "作" "苍白" "无聊" "解释" "只能" "增加" "人们" "讥讽" "气愤"
"人民日报" "痛批" "莫非" "救人" "还分" "领空" "领地"
"人在旅途" "遭遇" "急病" "各方" "都" "应" "时间" "赛跑" "抢救" "生命" "这起" "事件" "中" "能力" "施救" "人员" "慢作为" "不" "相互之间" "推脱" "责任" "令人心寒" "造成" "这种" "状况" "根本原因" "相关" "人员" "责任心" "不强" "责任" "边界" "不" "清晰" "不" "愿意" "危急关头" "承担责任"
"26" "日" "张" "先生" "乘坐" "南航" "CZ6101" "次" "航班" "时" "突发" "肠梗阻" "转院" "过程" "中" "遭到" "急救车" "工作人员" "欺骗" "协和" "三甲" "医院" "挂不上号" "送往" "市" "红十字会" "紧急" "救援" "中心" "质疑" "北京市" "999" "急救中心" "涉嫌" "利益输送" "市" "卫计委" "999" "急救中心" "正在" "调查"
"个人" "认为" "南航" "虽有" "责任" "情节" "较轻" "空乘" "空保" "去" "协助" "抬" "南航" "人" "害怕" "担责任" "民航" "航空公司" "不" "应该" "反思" "一下" "曾经" "遇到" "机场" "监护人员" "帮忙" "抬上" "飞机" "有份" "工作" "不" "容易" "都" "怕" "犯错误" "当事人" "999" "已" "道歉" "表示" "愿意" "赔偿" "财经网"
"看见" "没" "医疗" "部门" "赚俩钱" "老脸" "都" "不要" "北京" "二三线" "无耻" "地步"
"黑十字" "出来" "骗人" "当事人" "999" "已" "道歉" "表示" "愿" "赔偿"
"看来" "最" "恶劣" "999" "首都机场" "急救中心" "再就是" "机场" "BGS" "其实" "南航" "还" "真" "没有" "错误"
"都" "不用说" "告诉" "病人" "送到" "999" "给不给" "回款" "包括" "现结" "月" "结年" "结都算"
"道歉" "有什么用" "反思" "检讨" "改变"
"权力" "牟利" "已" "无所不用其极" "不惜" "草菅人命" "制度" "设计" "漏洞" "势必" "造成" "北京" "999" "急救" "这种" "劣行" "制度" "设计" "应" "充分" "估计" "人性" "弱点" "善加" "防范" "诱导" "现在" "往往" "制度" "设计者" "获利" "人性" "之恶" "设计" "时" "发酵"
"人命关天" "生命" "更" "重要"
"救人" "人" "都" "失去" "良心"
"999" "等于" "救救救" "不是" "实际上" "求求求" "球球球" "久久久"
"看" "完" "心凉" "老百姓" "活"
"这种" "事儿" "人" "一辈子" "基本" "都" "会" "遇到" "转死" "北京" "黑十字会"
"红十字会" "最大" "祸害" "红十字"
"一条" "生命" "都" "值得" "尊重" "后续" "看" "完" "觉得" "真扯" "医德" "何在" "救护车" "双十一" "租来" "送" "快递" "之过" "生命" "通行车" "越来越" "夸张" "扯淡" "路上"
"红十字会" "臭了"
"南航" "责任" "应该" "更多" "太" "没有" "职业道德" "良心" "上" "过得去"
"这种" "单位" "存在" "必要"
"红会" "名声" "臭" "不止" "一天两天"
"话" "说" "红十字会" "事业单位" "不" "卫" "计" "部门" "高" "都" "美国" "中国" "保留" "组织" "吸" "中国" "老百姓" "血吗"
"多少年来" "都" "知道" "涛声" "依旧"
"中间" "利益链" "应该" "挖掘"
"北京" "红十字会" "999" "急救" "应该" "配合" "调查" "公众" "知情权"
"999" "急救中心" "领导" "什么鸟" "领导" "什么鸟" "健康" "生命" "之上" "领导" "算" "生命" "鸟" "尊严" "人格" "之上" "领导" "什么鸟" "金钱" "利益" "面前" "领导" "的确" "只" "鸟" "看" "新闻" "999" "急救" "硬" "伤者" "送到" "很远" "清河" "检查" "后" "判断" "吸毒"
"本人" "声明" "此生" "绝不" "红十字会" "捐" "一分钱"
"话" "说" "记者" "死" "没人会管" "老百姓" "只能" "死"
"呵呵" "杜月笙" "副会长" "时有" "天壤之别"
"事件" "最终" "演变成" "朋友圈" "坚决" "不" "999" "活动"
"红十字会" "领导" "都" "美国" "办公" "住" "美国" "分享" "网易" "新闻"
"11" "月" "26" "日" "乘客" "张" "先生"
"999" "急救" "电话" "还敢" "打吗" "忽略" "事实"
"这位" "记者" "倒霉" "到家" "两点" "幸运" "第一" "认识" "医生" "朋友" "关键" "逃离" "999" "转院" "做" "手术" "记者" "话语权" "过去" "积累" "人脉" "事后" "引发" "广泛" "关注" "这年头" "资源" "都" "争取" "指望" "别人" "不易"
"话" "说" "明显" "柿子挑软的捏"
"中国红十字会" "厚颜无耻"
"告诉" "红十字会" "真" "不能" "相信" "再" "粉饰" "改变" "不了" "吸血" "畜生" "内在"
"传播" "曝光" "才" "可能" "机构" "人" "压力" "才" "可能" "使" "以后" "突发" "紧急" "病症" "人" "不再" "对待" "耽误"
"这种" "倨傲" "敷衍" "顽固" "态度" "真是" "跃然纸上" "真不知道" "999" "急救中心" "到底" "存在"
"事件" "看" "应该" "999" "关闭" "掉" "只" "保留" "120" "不" "能够" "再" "害人" "999" "存在"
"张" "先生" "外国人" "猜" "会" "咋样"
"事件" "想" "说" "999" "根本" "120" "999" "非常" "坑人"
"南航" "999" "急救门" "事件" "凸显" "国家" "院前" "急救" "存在" "诸多" "问题"
"小屋" "近几天来" "持续" "关注" "这件" "事" "这件" "事情" "暴露" "我国" "紧急" "应急" "机制" "巨大" "漏洞" "当事人" "称" "推上" "手术台" "时" "已" "出现" "大面积" "肠" "坏死" "再" "耽误" "些许" "绝无" "生还" "希望"
"评论" "里" "很多" "人" "骂" "999" "说" "亲身经历" "一贯" "999" "急救中心" "中途" "路过" "三甲" "医院" "不停" "奇怪" "多年" "相信" "不少" "投诉" "屹立" "不倒"
"事件" "现在" "明白" "过去" "120" "急救车" "病人" "直接" "送进" "附近" "医院" "999" "病人" "直接" "拉到" "999" "再" "做" "一通" "检查" "好" "收费" "检查" "完" "有没有" "医疗" "水平" "病人" "折腾" "半死" "后" "收" "费" "再" "转院" "说" "混蛋" "不" "混蛋" "强烈要求" "999" "关掉" "停止" "这种" "害人" "行径" "凡是" "经历" "999" "估计" "都" "同感"
"中国红十字会" "真是" "神" "存在" "999" "急救" "看来" "999" "要人命"
"红十字会"
"分" "分钟" "不认账"
"说" "无耻" "简直" "侮辱" "无耻" "两个" "字"
"都" "不肯" "做" "一点" "新华网"
"近日" "当事人" "张" "先生" "微博" "发表声明" "称" "999" "急救中心" "欺骗" "患者" "强行" "转诊" "已向" "北京市" "卫计委" "投诉" "999" "急救中心" "索赔"
"当事人" "质疑" "999" "调查" "奇葩" "国度" "里面" "奇葩" "事情"
"普通人" "医生" "看病" "不错" "了吗" "是因为" "奴性" "思想" "才" "会" "不公"
"国内" "救护车" "人员" "职责" "不清" "没有" "投诉" "监管" "相应" "制约" "造就" "本该" "救死扶伤" "人" "变成" "路人" "更" "可恨" "之人" "孤寡" "之人" "昏迷" "要求" "病人" "爬行" "车上" "不" "救助" "其实" "更" "可耻" "应为" "渎职" "当事人" "质疑" "999" "调查报告" "没" "问"
"病人" "没人" "抬" "身边" "没有" "家属" "挣扎" "爬" "上" "担架" "原因" "救护车" "没有" "配" "担架" "工" "周围" "没有" "人吗" "周围" "人" "干什么" "去了" "难道" "围观" "冷漠" "北京" "999" "急救中心" "调查" "所有人" "都" "问" "不来" "问问" "生病" "当事人" "随便" "都" "没有" "道理" "都" "咄咄怪事"
"急救车" "不" "配备" "抬架工" "不是" "没个" "病人" "都" "家属" "身边"
"不要脸" "南航" "旅客" "新浪" "新闻"
"老子" "干" "本事" "告" "告" "我呀" "我爸" "红十字会" "李刚" "一副" "嘴脸"
"之后" "当事人" "再次" "曝光" "北京" "999" "急救中心" "出现" "问题" "努力" "寻求" "好" "机制" "才能" "激励" "出" "人性" "曙光" "人性" "时刻" "架" "利益" "上" "炙烤" "很" "残酷" "病痛" "缠身" "病人" "必须" "跨栏" "高手" "跨过" "一道" "鬼门关" "还要" "再" "跨" "一道" "人为" "关卡" "更" "残酷"
"或许" "更名" "999" "急救门" "发酵" "至今" "超过" "十天" "事件" "热度" "不降反升" "网友" "关注" "焦点" "南航" "转到" "999" "急诊" "抢救" "中心" "下" "称" "999" "急救中心" "上" "当事人" "张" "先生" "指责" "欺骗" "患者" "强行" "送往" "999" "急救中心" "涉嫌" "利益输送"
"999" "急救" "系统" "乱象" "众多" "媒体" "网友" "聚焦" "披露" "下" "事件" "中所" "涉及" "999" "急救" "系统" "乱象" "逐渐" "减" "浮出" "水面" "相关" "人士" "透露" "999" "急救车" "确实" "存在" "急救" "人员" "医院" "协作" "医院" "收取" "提成" "现象" "存在" "医生" "无证" "上岗" "问题"
"医改" "改到" "家"
"说出" "病人" "急须" "抢救" "无奈" "主人公" "记者" "发病" "紧急" "时刻" "都" "好" "两个" "医生" "朋友" "救" "常人" "那不早" "挂了"
"原来" "红十字会"
"北京" "999" "急救中心" "最近" "南航" "旅客" "急救门" "处于" "全国" "公众" "舆论" "漩涡" "中心" "现在" "看来" "999" "急救中心" "红十字" "医院" "存在" "利益输送" "问题" "似乎" "已经" "摆脱" "不了" "事实" "郭美美" "事件" "现在" "999" "急救门" "中国" "红十字会" "需要" "送进" "医院" "医疗" "历史" "时刻"
"国际红十字会" "信誉" "很" "好" "公益" "慈善机构" "成" "事业单位" "成" "懂" "红会" "更" "不" "明白" "北京" "红会" "干" "急救" "系统" "公益" "经营"
"最近" "两个" "新闻" "鹰隼" "判" "十年" "av" "人" "日" "报道" "做" "拿块" "豆腐" "撞死" "还好" "大部分" "人" "不信" "幸好" "急救门" "当事人" "记者" "想" "起来" "拼" "整个儿" "人" "东西" "觉得" "上不来" "气"
"早安" "今天" "已" "变身" "999" "急救门" "当事人" "称" "999" "昨晚" "正式" "道歉" "表态" "会" "努力提高" "医疗" "水平" "接受" "公众" "监督" "仅仅" "道歉" "还远" "不够" "舍近求远" "急救" "路线" "需要" "解释" "疑点重重" "机构" "设置" "有待" "明晰" "需要" "999" "主管机构" "进一步" "回应" "院前" "急救" "人命关天" "当事人" "不是" "孤例" "应该" "成为" "最后" "一例"
"前两天" "999" "急诊" "还" "口气" "强硬" "很" "今天" "先" "公开" "一下" "红十字" "关系" "运营" "方式"
"送" "人" "回扣" "不说" "改正" "拉客" "回扣" "问题" "糊弄人" "虚伪" "道歉"
"红十字会" "真是" "垃圾"
"港" "媒" "关注" "999" "救护车" "送" "病人" "获利" "社会" "黑暗" "利益" "熏心" "人性" "堕落" "都" "金钱" "惹" "祸" "一定" "要说" "这种" "行为" "可悲" "更是" "可耻" "终" "一日" "人心" "会" "贪婪" "侵蚀"
"不" "应该" "道歉" "应该" "追究" "欺诈" "意图" "谋杀" "刑事责任"
"节目" "标题" "看" "标题" "倒不如" "改为" "中国" "急救" "体系" "生死考验" "更为" "合适"
"贵圈" "真乱"
"红会" "金钟罩" "不是" "一天两天" "郭美美" "现在" "屹立" "不倒" "试图" "问责" "民众" "还会" "指责" "政治" "不" "正确"
"光" "道歉" "有什么用" "希望" "部门" "999" "急救" "系统" "彻底" "调查" "彻底" "改善" "这种" "情况" "毕竟" "人命关天" "南航" "道歉" "想" "知道" "以后" "针对" "这种" "情况" "继续" "死板"
"命" "交" "人" "手里" "红会" "真是" "上上下下" "烂透" "草菅人命" "组织"
"红十字会" "最大" "祸害" "红十字" "深夜里" "不得不" "想起" "郭美美"
"制度" "漏洞" "监管" "缺失" "不" "再" "加上" "唯利是图" "价值观" "导致" "人性" "缺失" "目前" "普遍现象" "看来" "上次" "郭" "某某" "事件" "之后" "红十字会" "糊弄" "过去" "整个" "系统" "问题" "根儿" "上" "问题" "没有" "解决" "要求" "严查" "整顿"
"冒出来" "999" "急救中心" "草菅人命" "必须" "彻查"
"腐败"
"红十字会" "国际性" "组织" "很" "牛逼"
"红十字会" "领导" "巧" "全部" "去" "美国" "去" "多人" "做啥" "捐助" "钱吗" "是不是" "应该" "说明" "一下"
"不想" "说些" "或许" "尽可能" "保持" "健康" "身体" "才能" "避免" "人" "打交道"
"草菅人命" "红十字" "真是太" "渣了"
"999" "真的" "吊" "太" "不可" "思意"
"急救门" "事件" "南航" "机场" "责任" "都" "有限" "真正" "恶劣" "后来" "的事" "红十字会" "系统" "999" "急救" "身为" "院前" "抢救" "系统" "无视" "病人" "紧急" "需求" "强行" "送" "急救中心" "诊断" "错误" "无法" "抢救" "下" "还" "不让" "转院" "幸好" "事主" "朋友" "及时" "施救" "挽回" "一命"
"事件" "持续" "升温" "昨日" "下午" "事件" "当事人" "张" "先生" "新京报" "记者" "表示" "前晚" "接到" "北京" "999" "急救中心" "电话" "对方" "表示" "道歉" "愿意" "赔偿" "急救中心" "再次" "反复" "做" "检查" "赚钱" "急救中心" "出" "馊主意" "以后" "再" "遇到" "这种" "情况" "直接" "人" "搞" "死" "更" "省事" "无非" "一句" "尽力" "管它" "有没有" "医疗" "水平"
"事件" "来看" "今后" "绝对" "不敢" "打电话" "999" "999" "赚钱" "会" "要人命" "的呀" "钱" "还要" "人命" "可恶" "我家" "999" "附近" "当年" "很" "纳闷" "急救" "120" "北京" "冒出来" "999" "原来" "害人" "机构"
"患病" "乘客" "无人" "抬" "爬" "下" "飞机" "国家" "卫计委" "已" "要求" "北京市" "卫计委" "针对" "事件" "调查核实" "情况" "做出" "认真" "处理" "北京市" "卫计委" "表示" "调查" "属实" "依据" "法律法规" "违反" "相关" "规定" "单位" "法律" "予以" "处罚" "京华" "时报"
"999" "急救" "鬼"
"医闹入" "刑" "有益于" "就医" "环境" "然" "后续" "999" "事件" "医患" "关系紧张" "根源" "所在" "被骗" "诸多" "钱财" "无益" "病时" "好" "心情" "不闹" "闹" "入" "刑" "然" "医者" "无罪"
"红十字会" "郭美美" "说不清楚" "拉" "吃回扣" "白痴" "医院" "国家" "一下"
"愤怒" "无奈" "上贼船" "要命" "贼船" "撑腰" "是天"
"看" "一次" "便" "惊出" "一身" "冷汗" "999" "红会" "没有" "存在" "必要" "牵出" "999" "急救中心" "曝" "怪现状" "手机" "财" "新网"
"不能" "999" "游离" "急救" "规范" "之外" "不妨" "120" "999" "进行" "代管" "立生" "近日" "当事人" "张" "先生" "微博" "发表声明" "称" "999" "急救中心" "欺骗" "患者" "强行" "转诊" "已向" "北京市" "卫计委" "投诉" "999" "急救中心" "索赔" "此前" "9..." "不能" "999..."
"急求" "本来" "不" "应该" "民营" "资本" "干" "好好" "查查" "红会"
"医疗" "腐败" "冰山一角"
"红十会" "成" "黑十字会" "999" "更" "摘牌" "审查"
"软件" "出" "问题" "变更" "修改" "医院" "出" "问题" "人死" "都" "没" "道歉" "有什么用" "行业" "不能" "道歉"

R语言统计词频 画词云的更多相关文章

  1. Python 中文文件统计词频 + 中文词云

    1. 词频统计: import jieba txt = open("threekingdoms3.txt", "r", encoding='utf-8').re ...

  2. R系列:分词、去停用词、画词云(词云形状可自定义)

    附注:不要问我为什么写这么快,是16年写的. R的优点:免费.界面友好(个人认为没有matlab友好,matlab在我心中就是统计软件中极简主义的代表).小(压缩包就几十M,MATLAB.R2009b ...

  3. Matplotlib学习---用wordcloud画词云(Word Cloud)

    画词云首先需要安装wordcloud(生成词云)和jieba(中文分词). 先来说说wordcloud的安装吧,真是一波三折.首先用pip install wordcloud出现错误,说需要安装Vis ...

  4. 通过R语言统计考研英语(二)单词出现频率

    通过R语言统计考研英语(二)单词出现频率 大家对英语考试并不陌生,首先是背单词,就是所谓的高频词汇.厚厚的一本单词,真的看的头大.最近结合自己刚学的R语言,为年底的考研做准备,想统计一下最近考研英语( ...

  5. 更新几篇之前写在公众号上的文章:线性可分时SVM理论推导;关联分析做捆绑销售和推荐;分词、去停用词和画词云

    适合阅读人群:有一定的数学基础. 这几篇文章是16年写的,之前发布在个人公众号上,公众号现已弃用.回过头来再看这几篇文章,发现写的过于稚嫩,思考也不全面,这说明我又进步了,但还是作为学习笔记记在这里了 ...

  6. 根据词频生成词云(Python wordcloud实现)

    网上大多数词云的代码都是基于原始文本生成,这里写一个根据词频生成词云的小例子,都是基于现成的函数. 另外有个在线制作词云的网站也很不错,推荐使用:WordArt 安装词云与画图包 pip3 insta ...

  7. 利用python实现简单词频统计、构建词云

    1.利用jieba分词,排除停用词stopword之后,对文章中的词进行词频统计,并用matplotlib进行直方图展示 # coding: utf-8 import codecs import ma ...

  8. R语言统计学习-1简介

    一. 统计学习概述 统计学习是指一组用于理解数据和建模的工具集.这些工具可分为有监督或无监督.1.监督学习:用于根据一个或多个输入预测或估计输出.常用于商业.医学.天体物理学和公共政策等领域.2.无监 ...

  9. 利用jieba库画词云

    from wordcloud import WordCloud import matplotlib.pyplot as plt import jieba # 生成词云 def create_word_ ...

随机推荐

  1. php 网络爬虫,爬一下花瓣的图片

    今天无聊看在知乎上看到有人写网络爬虫爬图片( ̄▽  ̄) 传送门: 福利 - 不过百行代码的爬虫爬取美女图:https://zhuanlan.zhihu.com/p/24730075 福利 - 不过十行 ...

  2. oracle中的内连接和外连接区别

    表t_user1,t_user2,t_user3,各有id,name两列 id name 1 10A 2 20A id name 1 10B 3 30B id name 1 10C 4 40C 连接分 ...

  3. SaltStack 如何自定义 grains 信息

    首先在 minion 上编辑 grains 配置文件,然后添加自定义的 grains: [root@localhost ~]$ cat /etc/salt/grains # 这个文件默认是没有的 ro ...

  4. ftp服务通信操作

    1.将本地虚拟机网卡设置ip--->2.将虚拟机系统的网卡ip设置--->3.虚拟机设置特定网络模式vm8nat模式: (1) (2) (3) 保证正常互ping 通信, 4.在虚拟机系统 ...

  5. Putty的安装和使用

     Putty是最简单易用的SSH工具,详细介绍其安装和使用 直接在百度里搜索Putty,可以找到百度软件中心,或者官方网站: PuTTY Download Page.  进入官方网站,直接可执行文件装 ...

  6. Effective C++ —— 让自己习惯C++(一)

    条款01 : 视C++为一个语言联邦 C++ == C(C基本语法) + Object-Oriented C++(类,封装,继承,多态……) + Template C++(泛型编程) + STL(容器 ...

  7. C++异常 调用abort()

    以一个计算两个数的调和平均数的函数为例.两个数的调和平均数的定义是:这两个数倒数的平均值的倒数,因此表达式为:1.0 * x * y / (x + y)如果y是x的负值,则上述公式将导致被零除——一种 ...

  8. Android 监听按钮的点击事件

    onClick事件1.Button和ImageButton都拥有一个onClick事件 通过自身的.setOnClickListener(OnClickListener)方法添加点击事件2.所有的控件 ...

  9. 剑指offer练习

    1.题目描述 在一个二维数组中,每一行都按照从左到右递增的顺序排序,每一列都按照从上到下递增的顺序排序.请完成一个函数,输入这样的一个二维数组和一个整数,判断数组中是否含有该整数.  public c ...

  10. pycharm激活地址

    http://elporfirio.com:1017 http://idea.iteblog.com/key.php