R语言绘图开帖

A <- A[,-2]A[,-3]
这也太人性化了,符号就代表相减。

O<-cor(delnan)
corrplot.mixed(O, lower = "number", upper = "circle", tl.col = "black",lower.col = "black", number.cex = 1)  
var.test(X,Y,conf.level = 0.95)

	F test to compare two variances

data:  X and Y
F = 1.2549, num df = 214, denom df = 681, p-value = 0.03517
alternative hypothesis: true ratio of variances is not equal to 1
95 percent confidence interval:
 1.015792 1.569904
sample estimates:
ratio of variances 
          1.254934 

P225
t.test(old$total,new$total,alternative = "greater",paired = FALSE)

	Welch Two Sample t-test

data:  old$total and new$total
t = 2.3204, df = 424.96, p-value = 0.0104
alternative hypothesis: true difference in means is greater than 0
95 percent confidence interval:
 0.7398228       Inf
sample estimates:
mean of x mean of y 
 12.86279  10.30811 

 
	F test to compare two variances

data:  old$total and new$total
F = 1.6429, num df = 480, denom df = 184, p-value = 0.0001094
alternative hypothesis: true ratio of variances is not equal to 1
95 percent confidence interval:
 1.282709 2.076794
sample estimates:
ratio of variances 
          1.642878 

非参数检验

library(ggplot2)
p<-ggplot(old, aes(x = old$total))
#注释:x轴表示weight,y轴表示频率就不需要指定啦

p + geom_density(color = "black", fill = "gray")+ geom_density(aes(color = old$year))

q<-ggplot(new, aes(x = new$total))

q + geom_density(color = "red", fill = "black")+ geom_density(aes(color = new$year))

cbind(new$total,old$total)

p<-ggplot(oldnewdata, aes(x = number))
p + geom_density(color = "black", fill = "gray")
p + geom_density(aes(color = type))

p + geom_density(aes(fill = type), alpha=0.4)

x,y x~y看数据的分布

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值