《R语言入门与实践》学习笔记一(chapter1~3)

1 基本语句的使用
 
 
 
2 编写R脚本
 

 

 
3 编写自定义函数
 

 

roll3 = function(){
  d = 1: 6
//prob 改变出现的概率
  di = sample(d,size = 2,replace = T,prob = c(1/8,1/8,1/8,1/8,1/8,3/8))
  sum(di)
}

 

 

四 提到的命令
mean()
round()
sample()
args()
 
library()
qplot(x,y)
qplot(x,binwidth=1)
 
 
 
posted @ 2018-01-05 11:05  doctorW  阅读(192)  评论(0编辑  收藏  举报