1 | knitr::opts_chunk$set(echo = TRUE) |
1.11
2data1=read.csv('/home/fantasy/Desktop/r2/data/data1.csv',sep=',',header =F )
print(data1)
1.21
2data2=read.csv('/home/fantasy/Desktop/r2/data/data2.csv')
print(data2)
1.31
2data3=read.table('/home/fantasy/Desktop/r2/data/data3.csv',sep=',',header=F)
print(data3)
1.41
2mydata=read.csv('/home/fantasy/Desktop/train.csv')
print(mydata)
2.1
2x=seq(0,100,1)
plot(x,x+1/x)
1 | x=seq(1,100,0.001) |
3.1
2x=rnorm(100,60,10)
x
1 | t.test(x,conf.level=0.95) |
1 | t.test(x,mu=60) |
1 | t.test(x,mu=60,alternative = 'greater') |
1 | t.test(x,mu=60,alternative = 'less') |
1 | y=rnorm(100,0,1) |
1 | var.test(x,y,conf.level = 0.95) |
4.11
binom.test(x=656,n=1000,p=1/2)
4.21
2s=rexp(100,2)
s
1 | t.test(s) |
5.1
2data=read.csv('/home/fantasy/Desktop/r2/data/成绩单.csv')
data
1 | chinese=c(data[,3]) |
1 | var(chinese) |
1 | hist(chinese) |
1 | data |
1 | data[,2][data[,5][data[,3]>120 & data[,4]>120]] |
1 | total_score=data[,3]+data[,4]+data[,5] |
1 | eng1=data[,5][data[,'total_score']>300] |