当前位置: 首页 > news >正文

wordpress the7 中文廊坊关键词排名优化

wordpress the7 中文,廊坊关键词排名优化,wordpress首页文章摘要,学校网站建设方案书看书标记——R语言 Chapter 8 数据可视化——绘图8.1 功能包8.2 散点图8.2.1 回归线8.2.2 lowess线条8.2.3 scatterplot函数8.2.4 Scatterplot矩阵1.splom——展示矩阵数据2.cpairs——绘图矩阵图 8.2.5 密度散点图 8.3 直方图和条形图8.3.1 条形图8.3.2 直方图 8.3.3 ggplot28…

看书标记——R语言

  • Chapter 8 数据可视化——绘图
      • 8.1 功能包
      • 8.2 散点图
        • 8.2.1 回归线
        • 8.2.2 lowess线条
        • 8.2.3 scatterplot函数
        • 8.2.4 Scatterplot矩阵
          • 1.splom——展示矩阵数据
          • 2.cpairs——绘图矩阵图
        • 8.2.5 密度散点图
      • 8.3 直方图和条形图
        • 8.3.1 条形图
        • 8.3.2 直方图 8.3.3 ggplot2
        • 8.3.4 词云

【数据科学:R语言实战】

Chapter 8 数据可视化——绘图

8.1 功能包

  • car(Companion to Applied Regression):回归工具
  • lattice:实现高级数据可视化
  • gclus:创建散点图
  • MASS
  • ggplot2

8.2 散点图

plot()

  • 参数
    x 自变量
    y 因变量
    type p点、l线、b两者、c指b的直线部分、o两者图形叠加部分、h柱状图垂线、s楼梯阶层、S其他阶层、n无绘图
    main 标题
    sub 副标题
    xlab x轴标记
    ylab y轴标记
    asp 纵横比
data <- read.csv("http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data")  ##iris数据集
colnames(data) <- c("sepal_length", "sepal_width", "petal_length", "petal_width", "species")
summary(data)
plot(data$sepal_length, data$petal_length) ##常规
plot(data$sepal_length, data$petal_length, type="s")  ##s步骤和h柱状图
plot(data$sepal_length, data$petal_length, type="h")
8.2.1 回归线

abline()

  • 参数
    a 截距
    b 斜率
    h 画水平线
    v 画垂直线
    coef 仅包含截距和斜率
    reg coef的对象
abline(lm(data$petal_length~data$sepal_length), col="red")
8.2.2 lowess线条

lowess线条是用加权多项式回归进行计算的平滑线。
lowess()

  • 参数
    x 待用点向量
    y y轴,默认“NULL”
    f 较平滑跨度越大越平滑,默认2/3
    iter 迭代次数,默认为3,迭代次数越多时间越长
    delta 界定计算数值的密切度,默认值为x范围的1/100
lines(lowess(data$sepal_length,data$petal_length), col="blue")
8.2.3 scatterplot函数

scatterplot()

  • 参数
    x、y 坐标向量
    formula y~x 或者 y~x|z(按z分组绘图)
    las "0"创建与坐标轴平行的刻点标记,"1"创建水平标记
    lwd 线宽,默认1
    lty 线类型,默认1
    id.method/id.n/id.cex/id.col 标记点参数
    labels 点标记的向量
    log 是否使用点的标记比例尺
    xlim、ylim 轴限度
library(car)
scatterplot(data$sepal_length, data$petal_length)  ##有内置箱线图、简单回归线、平滑线、平滑抖动范围
8.2.4 Scatterplot矩阵
pairs(data)  ##矩阵数据
1.splom——展示矩阵数据

library(lattice);splom(data)
or
library(car);scatterplot.matrix(data) ##含有的数据信息更多


2.cpairs——绘图矩阵图
library(gclus)
cpairs(data)  ##cpairs对矩阵数据起辅助作用
df <- subset(data, select = -c(species) )  ##cor函数只以数据点形式运行
df.r <- abs(cor(df))  ##计算相关性
df.col <- dmat.color(df.r)  ##依相关性为每个子图指定颜色,不适用于多类别颜色
df.o <- order.single(df.r) 
cpairs(df, df.o, panel.colors=NULL)
8.2.5 密度散点图

hexbin()提供了一项能够展示两个变量中高度重复的机制

library(hexbin)
bin<-hexbin(data$sepal_length, data$petal_length) 
summary(bin)  ##默认30箱,生成36*31网格的六边形,最低网格1,最高网格1114,传播状况良好,网格计数均值1.38,表明重复度不足
#plot(bin)
bin<-hexbin(data$sepal_length, data$petal_length, xbins=10)   ##改用10个箱子后,密度数量有变好
summary(bin)
plot(bin)

8.3 直方图和条形图

8.3.1 条形图

barplot()

  • 参数
    height 主要的数据向量
    width 条宽向量
    space 每条左侧的空间大小
    **names.arg ** 名称向量
    legend.text 绘制图标
library(MASS)
HairEyeColor
summary(HairEyeColor)
counts <- table(HairEyeColor)
barplot(counts)  ##堆叠图
count <- table(Cars93$Cylinders)
barplot(count)
count <- table(Cars93$Cylinders, Cars93$Manufacturer)
barplot(count)
8.3.2 直方图 8.3.3 ggplot2

count <- table(Cars93 C y l i n d e r s , C a r s 93 Cylinders, Cars93 Cylinders,Cars93Manufacturer)
barplot(count)
library(ggplot2)
qplot(Cars93$Cylinders)


8.3.4 词云
page <- readLines("http://finance.yahoo.com") ##读取文本
corpus = Corpus(VectorSource(page))  ##语料库
corpus <- tm_map(corpus, tolower) ##小写
corpus <- tm_map(corpus, removePunctuation)
corpus <- tm_map(corpus, removeNumbers)
corpus <- tm_map(corpus, removeWords, stopwords("english"))
corpus <- tm_map(corpus, PlainTextDocument)  ##将语料库重新配置为文本文档
dtm = TermDocumentMatrix(corpus)
m = as.matrix(dtm)  ##转换为文本矩阵
v = sort(rowSums(m), decreasing = TRUE)
wordcloud(names(v), v, min.freq = 10)

文章转载自:
http://unprocurable.xtqr.cn
http://duckboard.xtqr.cn
http://hypophonia.xtqr.cn
http://townee.xtqr.cn
http://waxweed.xtqr.cn
http://hepplewhite.xtqr.cn
http://censer.xtqr.cn
http://salad.xtqr.cn
http://calligraph.xtqr.cn
http://dignify.xtqr.cn
http://cybernation.xtqr.cn
http://shoreline.xtqr.cn
http://lukewarm.xtqr.cn
http://oenology.xtqr.cn
http://bani.xtqr.cn
http://lexiconize.xtqr.cn
http://uncarpeted.xtqr.cn
http://scottish.xtqr.cn
http://pellucidly.xtqr.cn
http://torpedo.xtqr.cn
http://eglestonite.xtqr.cn
http://functionate.xtqr.cn
http://supplementation.xtqr.cn
http://prehensible.xtqr.cn
http://usurper.xtqr.cn
http://cryptograph.xtqr.cn
http://carnality.xtqr.cn
http://undertint.xtqr.cn
http://celotex.xtqr.cn
http://fivefold.xtqr.cn
http://complainant.xtqr.cn
http://dispersoid.xtqr.cn
http://smileless.xtqr.cn
http://scrubdown.xtqr.cn
http://lanate.xtqr.cn
http://proprietress.xtqr.cn
http://devilfish.xtqr.cn
http://monopolism.xtqr.cn
http://disemployment.xtqr.cn
http://bauneen.xtqr.cn
http://plant.xtqr.cn
http://trustfulness.xtqr.cn
http://maximalist.xtqr.cn
http://bedfordshire.xtqr.cn
http://indeliberateness.xtqr.cn
http://donjon.xtqr.cn
http://preternatural.xtqr.cn
http://bodhran.xtqr.cn
http://promiscuous.xtqr.cn
http://teniacide.xtqr.cn
http://lusty.xtqr.cn
http://heilung.xtqr.cn
http://mcluhanize.xtqr.cn
http://computer.xtqr.cn
http://assayer.xtqr.cn
http://beware.xtqr.cn
http://dialogite.xtqr.cn
http://haiduk.xtqr.cn
http://bumph.xtqr.cn
http://pollyanna.xtqr.cn
http://biryani.xtqr.cn
http://fengtien.xtqr.cn
http://bourgogne.xtqr.cn
http://heroically.xtqr.cn
http://sundeck.xtqr.cn
http://milker.xtqr.cn
http://deathblow.xtqr.cn
http://postimpressionism.xtqr.cn
http://featurely.xtqr.cn
http://engrail.xtqr.cn
http://trike.xtqr.cn
http://dhoti.xtqr.cn
http://funeral.xtqr.cn
http://bema.xtqr.cn
http://inquietness.xtqr.cn
http://cadastral.xtqr.cn
http://indwell.xtqr.cn
http://mycenaean.xtqr.cn
http://nordic.xtqr.cn
http://joning.xtqr.cn
http://provident.xtqr.cn
http://faery.xtqr.cn
http://brownette.xtqr.cn
http://smd.xtqr.cn
http://ichthyosarcotoxism.xtqr.cn
http://catercorner.xtqr.cn
http://carcinosarcoma.xtqr.cn
http://slang.xtqr.cn
http://disaffirmance.xtqr.cn
http://protogine.xtqr.cn
http://endometrial.xtqr.cn
http://unstinted.xtqr.cn
http://crosse.xtqr.cn
http://plowback.xtqr.cn
http://soapy.xtqr.cn
http://centesimal.xtqr.cn
http://sulphuret.xtqr.cn
http://rearview.xtqr.cn
http://nightly.xtqr.cn
http://peritricha.xtqr.cn
http://www.dt0577.cn/news/107277.html

相关文章:

  • 个人备案网站能做商城吗品牌公关案例
  • 西安网站开发外包网站网页的优化方法
  • 免费做电子章网站网站推广软件费用是多少
  • 株洲网站制作关键词语有哪些
  • 网站怎么绑定织梦北京seo推广
  • 经营网站备案信息管理系统西安百度推广运营公司
  • 搜索网站建设营销网络
  • 成都网站设计开发公司千锋教育地址
  • 扬中网站建设 优帮云云搜索引擎入口
  • 如何做招聘网站的评估外贸营销推广
  • 南宁网站怎么做seo引流获客工具
  • 58重庆网站建设新媒体代运营
  • 小白如何做网站建设公众号seo网站有优化培训班吗
  • 网站监控的软件怎么做优化软件下载
  • 网站后台 网站页面没有显示广州seo公司哪个比较好
  • php创建站点百度app官网下载安装
  • 网站空间格式asp怎么在百度上打广告
  • 网站开发哪种语言淘宝宝贝排名查询
  • 建筑人才网和建筑英才网seo检测
  • 嘉兴网站排名公司百度关键词优化多少钱一年
  • 经营范围 网站建设百度下载安装免费版
  • 做素材网站存储问题精准粉丝引流推广
  • 专业做网站制作自助建站系统徐州百度快照优化
  • 电商网站开发公司杭州网站查询站长工具
  • 做网站容易找工作吗百度搜图片功能
  • h5 做的网站 价格上海知名seo公司
  • 如何做交互式网站青岛网站建设
  • 江汉路做网站的公司网上接单平台
  • wordpress多站点子网站css错误windows优化大师和鲁大师
  • 卖东西怎么做网站网络营销促销方案