- 59
- 0
- 约5.85千字
- 约 54页
- 2017-06-30 发布于河南
- 举报
第二讲 R语言基本数据结构
第二讲 R语言的基本数据结构;Name;Base: is.things
Base: recursion
Graphics: Hershey
Graphics: Japanese
Graphics: graphics
Graphics: image
Graphics: persp
Graphics: plotmath
Lattice: intervals
Lattice: labels
Lattice: lattice
Lattice: panel
Stats: glm.vr
Stats: lm.glm
Stats: nlm
Stats: smooth;一、R语言的对象;对象的产生、查询及删除;3、删除:rm(x)
删除内存中所有对象:rm(list=ls())
注:ls()函数中的一些选项同样可以运用到 rm中来;对象的基本属性;对象属性的转换;二、数据的创建;三、数值向量;gl(k,n) //k是水平数,n是每个水平重复的次数,有两个选项:length用来指定产生数据的个数,labels用来指定每个水平因子的名字
gl(3,5)
gl(3,5.4) #???????(1,1,1,1,1,2,2,2,2,2,,3,3,3,3,3);2、随机序列
R可以产生多种不同分布下的随机数序列。
sample(1:40,5)
[1] 25 32 2 35 9
sample(
原创力文档

文档评论(0)